Set X-Requested-With
header on Openverse.org requests
#3397
Labels
💻 aspect: code
Concerns the software code in the repository
🌟 goal: addition
Addition of new feature
help wanted
Open to participation from the community
🟨 priority: medium
Not blocking but should be addressed soon
🧱 stack: frontend
Related to the Nuxt frontend
⌨️ tech: typescript
Involves TypeScript
🔧 tech: vue
Involves Vue.js
Problem
It currently requires two separate headers to determine where requests are coming from. We can use User agent, but it is flaky and cannot be used on the frontend (browsers disallow it). We can also use the application name since #3369, but that doesn't work for the frontend because it doesn't make requests using the client id.
Cloudflare supports the
X-Requested-With
header especially, and it would make it possible for us to easily disambiguate where requests are coming from.Description
Set the
X-Requested-With
header on requests sent from Openverse.org to something sensible to identify requests coming from the frontend. Use a suffix to disambiguate SSR from client side.We can also ask for a similar thing to get implemented in Gutenberg's Openverse media integration and in Jetpack.
The text was updated successfully, but these errors were encountered: