Skip to content

Commit

Permalink
Update 403 page and redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierJp committed Oct 5, 2021
1 parent ecf4f19 commit 164279c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pages/403.tsx
Expand Up @@ -8,7 +8,7 @@ const TooManyRequest: React.FC = () => {
<Page small={true} title="Accès refusé">
<h1>Accès refusé</h1>
<p>
Notre algorithme de détéction pense que vous êtes un robot. Par
Notre algorithme de détection pense que vous êtes un robot. Par
conséquent, l’accès à cette page vous est refusé. <br />
Si c’est une erreur, merci de nous contacter au plus vite via notre FAQ.
</p>
Expand Down
12 changes: 6 additions & 6 deletions utils/redirects/index.ts
Expand Up @@ -8,25 +8,25 @@ export const redirect = (res: ServerResponse, path: string) => {
res.end();
};

export const redirectPageNotFound = (
export const redirectForbidden = (
res: ServerResponse,
msg: string,
scope?: IScope
) => {
redirect(res, '/404');
logWarningInSentry('Unknown url (404)', {
redirect(res, '/403');
logWarningInSentry('Access Forbidden', {
details: msg,
...scope,
});
};

export const redirectForbidden = (
export const redirectPageNotFound = (
res: ServerResponse,
msg: string,
scope?: IScope
) => {
redirect(res, '/403');
logWarningInSentry('Forbidden', {
redirect(res, '/404');
logWarningInSentry('Unknown url (404)', {
details: msg,
...scope,
});
Expand Down

0 comments on commit 164279c

Please sign in to comment.