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

proxy client request headers on SSR globally #323

Closed
tasiotas opened this issue Apr 4, 2023 · 0 comments
Closed

proxy client request headers on SSR globally #323

tasiotas opened this issue Apr 4, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@tasiotas
Copy link

tasiotas commented Apr 4, 2023

Your use case

Hi,

I need to pass user-agent and x-forwarded-for headers from Node running Nuxt to my backend.

Currently I am running this code before each Gql request

  const headers = useRequestHeaders(['x-forwarded-for', 'user-agent'])
  useGqlHeaders(headers)
  const { data } = await useAsyncGql({ operation: 'index' })

Bit tedious to add it for each Gql request.

The solution you'd like

Add global config with list of default headers to be passed along with requests. Both on Client and SSR

Thank you

Possible alternatives

No response

Additional information

No response

@tasiotas tasiotas added the enhancement New feature or request label Apr 4, 2023
@Diizzayy Diizzayy self-assigned this Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants