mirror of
https://github.com/discourse/discourse.git
synced 2025-10-04 17:32:34 +08:00
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). |
||
---|---|---|
.. | ||
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 |