AddLinkHeadersForPreloadedAssets causes 502 Bad Gateway
On a Laravel / Inertia / Vuejs project I'm having 502 issues on production only :
upstream sent too big header while reading response header from upstream
It seems that the issue comes from the AddLinkHeadersForPreloadedAssets middleware. I had to disable it. Should i increase the chunks size on vite config or this is it a dirty fix for a depper issue ?
If you have enough preloaded assets, the header size will exceed Nginx's default buffer size of 8 KB. You can increase the buffer size and restart Nginx, e.g.
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
These are just values from my local config. Adjust them as needed.