Skip to content

Commit

Permalink
use @architect/asap to proxy static playground
Browse files Browse the repository at this point in the history
in lieu of @architect/functions http.proxy

this became an issue when dependabot updated functions to 4.0.0
  • Loading branch information
tbeseda committed Jul 31, 2021
1 parent a3529a5 commit 1c8f86b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"dependencies": {
"@architect/architect": "^9.0.0",
"@architect/asap": "^4.0.0",
"@architect/eslint-config": "^1.0.0",
"@architect/functions": "^4.0.0",
"@architect/inventory": "^2.0.4",
Expand Down
5 changes: 3 additions & 2 deletions src/http/any-catchall/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
let { http } = require('@architect/functions')
let asap = require('@architect/asap')

// middleware to preserve old urls
let redirect = require('./redirect')

// middleware proxy s3 assets
let asap = http.proxy({
let static = asap({
spa: false,
alias: {
'/playground': '/playground.html'
}
})

exports.handler = http.async(redirect, asap)
exports.handler = http.async(redirect, static)

0 comments on commit 1c8f86b

Please sign in to comment.