mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-14 02:45:16 +08:00
Follow up from https://github.com/discourse/discourse/pull/31559. We expect some standard headers to be added from `Rails.application.config.action_dispatch.default_headers` for responses, however these were found to be removed in some error paths. For more detail on this behaviour, refer to https://github.com/discourse/discourse/pull/31619#issuecomment-2699644232. This PR adds those headers back if they aren't there, with the caveats that we don't add headers that are irrelevant for non-HTML responses, and neither do we add X-Frame-Options which is intentionally removed for embeddables. |
||
|---|---|---|
| .. | ||
| anonymous_cache.rb | ||
| csp_script_nonce_injector.rb | ||
| default_headers.rb | ||
| discourse_public_exceptions.rb | ||
| enforce_hostname.rb | ||
| missing_avatars.rb | ||
| omniauth_bypass_middleware.rb | ||
| processing_request.rb | ||
| request_tracker.rb | ||
| turbo_dev.rb | ||