Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set X-Requested-With header on Openverse.org requests #3397

Open
sarayourfriend opened this issue Nov 26, 2023 · 0 comments
Open

Set X-Requested-With header on Openverse.org requests #3397

sarayourfriend opened this issue Nov 26, 2023 · 0 comments
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

Comments

@sarayourfriend
Copy link
Collaborator

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.

@sarayourfriend sarayourfriend added help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🌟 goal: addition Addition of new feature 💻 aspect: code Concerns the software code in the repository 🧱 stack: frontend Related to the Nuxt frontend 🔧 tech: vue Involves Vue.js ⌨️ tech: typescript Involves TypeScript labels Nov 26, 2023
@openverse-bot openverse-bot moved this to 📋 Backlog in Openverse Backlog Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant