upper icon indicating copy to clipboard operation
upper copied to clipboard

Config setting to truncate header length

Open timkelty opened this issue 2 years ago • 3 comments

On large pages, it is possible that the XKEY/Surrogate-Key/Cache-Tag exceeds the allowed length of a header by the web server. IIRC, when this happens, it is generally not handled gracefully and you might get a fatal error from the web server.

I remember when I dealt with this, I had to go an bump the value in nginx and Varnish.

It would be nice if Upper had a config setting to automatically truncate the header, before it was output, to prevent this.

It could have a reasonable default set to whatever nginx or apache uses.

timkelty avatar Jun 01 '22 12:06 timkelty

https://github.com/ostark/upper/blob/master/src/config.example.php#L25-L30 👀

ostark avatar Jun 01 '22 12:06 ostark

well then!

timkelty avatar Jun 01 '22 12:06 timkelty

Adding a reasonable default limit makes sense.

ostark avatar Jun 01 '22 13:06 ostark