mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 11:56:46 +01:00
fix(web): remove link header causing 502 errors (#1765)
This commit is contained in:
parent
0d543bbb0a
commit
0f00f22212
1 changed files with 7 additions and 1 deletions
|
@ -2,7 +2,13 @@ import type { Handle, HandleServerError } from '@sveltejs/kit';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
|
|
||||||
export const handle: Handle = async ({ event, resolve }) => {
|
export const handle: Handle = async ({ event, resolve }) => {
|
||||||
return await resolve(event);
|
const res = await resolve(event);
|
||||||
|
|
||||||
|
// The link header can grow quite big and has caused issues with our nginx
|
||||||
|
// proxy returning a 502 Bad Gateway error. Therefore the header gets deleted.
|
||||||
|
res.headers.delete('Link');
|
||||||
|
|
||||||
|
return res;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const handleError: HandleServerError = async ({ error }) => {
|
export const handleError: HandleServerError = async ({ error }) => {
|
||||||
|
|
Loading…
Reference in a new issue