strapi icon indicating copy to clipboard operation
strapi copied to clipboard

Can I customize the Strapi url for only the data requests, yet keep the defaults on everything else?

Open philipimperato opened this issue 7 months ago • 0 comments

I want to use the API token to request data from Strapi. I want to pass it into the bearer auth header.

I don't want to expose the token on the front end, so I was using Nuxt's API /server/api/*route* to intercept the request and add the token server-side. Yet, when I do this I lose the useStrapi() functions as they will always hit the Strapi API directly.

Can I customize this just for the requests somehow?

philipimperato avatar Jan 10 '24 17:01 philipimperato