2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-04 17:32:34 +08:00
discourse/lib/middleware
Martin Brennan 33abb858e9
DEV: Add X-Discourse-BrowserPageView response header (#33598)
When we are tracking requests in the `Middleware::RequestTracker`, we
have historically added an `X-Discourse-TrackView` response header
for implicitly tracked requests HTML requests, and also explicitly
tracked page view requests when navigating the Ember app.

Within the past couple of years, we introduced the concept of
Browser Page Views (BPVs), which are recorded when requests are made
via AJAX when navigating the app with Ember, and also piggybacked
onto the first MessageBus request on page load. The former is known
as an explicitly tracked request, the latter is a deferred tracked request.

The explicitly tracked browser page views also add the `X-Discourse-TrackView`
header to the response, so it is hard to differentiate which requests are purely
browser page view requests in the logs.

This commit adds a new response header, `X-Discourse-BrowserPageView`,
that acts in a similar way to the existing `X-Discourse-TrackView`
header, but is specifically for requests that are tracked as BPVs (both explicit
and deferred).
2025-07-15 11:28:10 +10:00
..
anonymous_cache.rb DEV: Add new key for anon cache for localization (#32640) 2025-05-08 14:30:03 +08:00
csp_script_nonce_injector.rb DEV: Memoize CSP nonce placeholder on response (#25724) 2024-02-16 12:15:55 +00:00
default_headers.rb DEV: ensure Rails application default headers are present in responses (#31619) 2025-03-05 13:19:09 +08:00
discourse_public_exceptions.rb DEV: Fix Lint/ShadowingOuterLocalVariable (#32036) 2025-03-27 13:50:24 +01:00
enforce_hostname.rb DEV: Simplify CORS logic for public asset routes (#33106) 2025-06-09 08:58:27 +01:00
missing_avatars.rb DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00
omniauth_bypass_middleware.rb DEV: Update to OmniAuth 2.0 (#25707) 2025-02-11 11:18:07 +00:00
processing_request.rb FIX: Set sane default for Net::HTTP when processing a request (#28141) 2024-08-06 07:12:42 +08:00
request_tracker.rb DEV: Add X-Discourse-BrowserPageView response header (#33598) 2025-07-15 11:28:10 +10:00