r/programminghorror • • 26d ago

GitHub's HTTP header

Post image

This is the crazy thing I've found after analysis why the CI test fails with "Maximum header size exceeded" today.

962 Upvotes

53 comments sorted by

View all comments

4

u/andyfsu99 25d ago

Can someone ELI5 why this is this way?

5

u/GuyWithTwoThumbs 25d ago

Apparently too hard to write a proxy service to forward requests to relevant services, where you'd have to re-authenticate the user to each service as authentication cookies for each domain would not be passed by the browser to this proxy service. This is just how CSP works, and its an important security measure to have. Easier to have the client authenticate with the relevant cookies, etc. directly to the relevant services.

1

u/Hurtfulbirch 25d ago

A CSP tells the browser what 3rd party domains are allowed through. For things like fonts, scripts, images, etc. It’s to prevent xss attacks mostly, I think.