0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-04 10:39:43 +08:00
discourse/app/helpers
Alan Guo Xiang Tan 661ea0c2bd
PERF: Avoid replacing CSP nonces in non-cacheable responses (#42008)
CSP nonce placeholders are replaced after rendering by scanning and
copying the complete response body, even when the response could not
enter the anonymous cache.

Generate the final nonce before rendering non-cacheable requests so
templates can emit it directly. Requests eligible for anonymous caching
continue to use placeholders, preserving a unique nonce each time cached
HTML is served.

On a site with 11K categories for a logged in user, ~400ms was spent
executing `gsub` on the response body.
2026-07-24 09:49:01 +08:00
..
application_helper.rb PERF: Avoid replacing CSP nonces in non-cacheable responses (#42008) 2026-07-24 09:49:01 +08:00
common_helper.rb FIX: Skip third-party analytics tags in full app embed iframes (#39534) 2026-04-24 14:58:45 -03:00
email_helper.rb UX: add preview to email templates (#36657) 2026-01-08 11:33:53 +04:00
embed_helper.rb DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
emoji_helper.rb
list_helper.rb
posts_helper.rb
qunit_helper.rb PERF: Avoid HTML escaping preloaded JSON (#41978) 2026-07-24 09:25:06 +08:00
topic_post_bookmarkable_helper.rb
topics_helper.rb FEATURE: A dedicated 'show original' user preferences saved to user options (#39128) 2026-04-07 21:37:20 +08:00
user_notifications_helper.rb