-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use @architect/asap to proxy static playground
in lieu of @architect/functions http.proxy this became an issue when dependabot updated functions to 4.0.0
- Loading branch information
Showing
2 changed files
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |