mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-23 14:07:20 +03:00
redirects: adds redirect for system page
This commit is contained in:
parent
63e8abaf89
commit
d4f19b9abf
@ -10,6 +10,8 @@ const REJECT_LIST = [
|
||||
"_next",
|
||||
"next",
|
||||
"webpack",
|
||||
"system",
|
||||
"experience",
|
||||
"root",
|
||||
"www",
|
||||
"website",
|
||||
|
@ -47,6 +47,10 @@ app.prepare().then(async () => {
|
||||
});
|
||||
});
|
||||
|
||||
server.get("/system", async (req, res) => {
|
||||
res.redirect("/_/system");
|
||||
});
|
||||
|
||||
server.get("/:username", async (req, res) => {
|
||||
// TODO(jim): Temporary workaround
|
||||
if (!Validations.userRoute(req.params.username)) {
|
||||
@ -122,9 +126,7 @@ app.prepare().then(async () => {
|
||||
}
|
||||
|
||||
return app.render(req, res, "/_/slate", {
|
||||
slate: JSON.parse(
|
||||
JSON.stringify({ ...slate, ownername: req.params.username })
|
||||
),
|
||||
slate: JSON.parse(JSON.stringify({ ...slate, ownername: req.params.username })),
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user