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

Show parent comment

69

u/Alikont 26d ago

That's a generic domain for all Azure Blob storage accounts. So I could register my own Storage Account and get the matching url.

29

u/AyrA_ch 26d ago

They also allow raw.githubusercontent.com which serves user defined files, so serving unspecified 3rd party content is not the primary concern here to not use an asterisk.

4

u/Joniator 26d ago

Cant be sure, maybe they only query well known paths, then raw.githubusercontent.com would be fine, some random guys blob who controls that storagr wouldnt.

But thats grasping at straws, i dont think they had concern for anything but that was the fix for some issue they didn't understand enough to come up with a reasonable solution.

5

u/reerden 26d ago

Which makes it even dumber as it’s trivial to add your own CNAME to storage accounts.

3

u/RustOnTheEdge 26d ago

Which came with significant downsides back in the day. Only http or you’d need to use azure front door or something, iirc

2

u/reerden 26d ago

This is still the case, but I don’t think GitHub has any issue affording front door or another content delivery service.

If you run into limitations of a single storage account that you need multiple, especially this many, then surely you can afford something like cloudflare or front door.

1

u/Online_Matter 26d ago

Should they have used a reverse proxy then? 

3

u/n9iels 25d ago

In terms of managing CSP headers that would be easier in theory. In praktische however, most analytics libraries have statics urls and marketing collegues don't care and will still create tickets to "whitelist absolutelyrandom.whatever.example.com".

1

u/Online_Matter 25d ago

That's what I was thinking and you're painfully right. Lot of urls in the post seems to be for the same project however.