impress/app
Emi Matchu 58d7c38523 Simplify CSP header for SWF asset embeds, to fix 502 for some assets
Fun little bug: viewing the "Engulfed in Flames Effect" item was
showing our "502 Bad Gateway" custom error page in the embed. This is
because the Rails app was providing a `Content-Security-Policy` header
value that was longer than nginx is configured by default to allow, so
it was refusing the response, and showing the same 502 error as if the
app hadn't responded at all. (We discovered this by opening
`/var/log/nginx/error.log`, which explained this very clearly, ty~!)

In this change, we no longer list every `images.neopets.com` asset,
instead marking the entire domain as a valid image source for the
SWF asset embed iframe. I don't _love_ this solution, I liked the
property of specifying literally exactly the assets we allow! But I
don't think there's any practical danger here, and it helps a *lot* for
making this more reliable.

(If we could have solved this reliably by increasing nginx's allowed
response header size, I probably would've done that? But I researched a
bit, and ultimately concluded that I don't trust other intermediary
software like firewalls not to have the same issue. Let's not be
pushing the limits of HTTP headers of all things!)
2024-09-12 15:59:18 -07:00
..
assets Oops, fix typo blocking non-bold-or-italic Delicious font from loading 2024-09-09 21:45:52 -07:00
controllers Simplify CSP header for SWF asset embeds, to fix 502 for some assets 2024-09-12 15:59:18 -07:00
helpers Add Customize More button back to item pages 2024-09-06 17:12:11 -07:00
javascript Set Prettier default to tabs instead of spaces, run on all JS 2024-09-09 16:11:48 -07:00
mailers/fundraising Move most fundraising files into a Fundraising module 2024-02-18 20:12:14 -08:00
models Remove needed items form on Modeling Hub 2024-09-09 18:56:39 -07:00
services Upgrade async and related gems, and fix async-http response handling 2024-09-07 12:14:12 -07:00
views Refactor module sections on homepage, to handle font change 2024-09-09 21:33:05 -07:00