1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

fix(web): remove link header causing 502 errors (#1765)

This commit is contained in:
Michel Heusschen 2023-02-15 13:40:52 +01:00 committed by GitHub
parent 0d543bbb0a
commit 0f00f22212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,13 @@ import type { Handle, HandleServerError } from '@sveltejs/kit';
import { AxiosError } from 'axios';
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 }) => {