mirror of https://github.com/calzoneman/sync.git
Minor fixes
This commit is contained in:
parent
6505aa2f5e
commit
5c339656b7
|
@ -127,7 +127,7 @@ function handleLogout(req, res) {
|
|||
res.clearCookie("auth");
|
||||
req.user = res.user = null;
|
||||
// Try to find an appropriate redirect
|
||||
var dest = req.params.dest || req.header("referer");
|
||||
var dest = req.body.dest || req.header("referer");
|
||||
dest = dest && dest.match(/login|logout|account/) ? null : dest;
|
||||
|
||||
var host = req.hostname;
|
||||
|
|
|
@ -8,7 +8,7 @@ export default function initialize(app, ioConfig) {
|
|||
app.get('/r/:channel', (req, res) => {
|
||||
if (!req.params.channel || !CyTubeUtil.isValidChannelName(req.params.channel)) {
|
||||
throw new HTTPError(`"${sanitizeText(req.params.channel)}" is not a valid ` +
|
||||
'channel name.', { status: HTTPStatus.BAD_REQUEST });
|
||||
'channel name.', { status: HTTPStatus.NOT_FOUND });
|
||||
}
|
||||
|
||||
const endpoints = ioConfig.getSocketEndpoints();
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
mixin notfound()
|
||||
h1 Not Found
|
||||
p The page you were looking for doesn't seem to exist. Please check that you typed the URL correctly.
|
||||
if message
|
||||
p Reason: #{message}
|
||||
mixin forbidden()
|
||||
h1 Forbidden
|
||||
p You don't have permission to access <code>#{path}</code>
|
||||
|
|
Loading…
Reference in New Issue