mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-21 14:55:04 +00:00
handle non-Sapper responses when exporting - fixes #392
This commit is contained in:
@@ -108,6 +108,13 @@ const middlewares = [
|
||||
}),
|
||||
];
|
||||
|
||||
app.get(`${BASEPATH}/non-sapper-redirect-from`, (req, res) => {
|
||||
res.writeHead(301, {
|
||||
Location: `${BASEPATH}/non-sapper-redirect-to`
|
||||
});
|
||||
res.end();
|
||||
});
|
||||
|
||||
if (BASEPATH) {
|
||||
app.use(BASEPATH, ...middlewares);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user