generated from nhcarrigan/template
fix: send back origin?
All checks were successful
Node.js CI / Lint and Test (push) Successful in 1m15s
All checks were successful
Node.js CI / Lint and Test (push) Successful in 1m15s
This commit is contained in:
@ -34,8 +34,8 @@ export const corsHook: onRequestHookHandler = async(request, response) => {
|
|||||||
if (!isValidOrigin(request.headers.origin)) {
|
if (!isValidOrigin(request.headers.origin)) {
|
||||||
return await response.status(403).send({
|
return await response.status(403).send({
|
||||||
error:
|
error:
|
||||||
// eslint-disable-next-line stylistic/max-len -- This is a long error message.
|
|
||||||
"This route is only accessible from our dashboard at https://hikari.nhcarrigan.com.",
|
`This route is only accessible from our dashboard at https://hikari.nhcarrigan.com - your origin of ${String(request.headers.origin)} is invalid..`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
|
Reference in New Issue
Block a user