nuxt-modules / nuxt-modules/strapi
Can I customize the Strapi url for only the data requests, yet keep the defaults on everything else?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 717
- Forks
- 89
- Avg merge
- 7h 3m
- Merged PRs (30d)
- 6
Description
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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Nuxt server/api/route entry point described in the issue and trace how useStrapi() constructs its requests. Check whether request-specific URL and server-side bearer authentication are supported without changing other defaults. Done means the supported behavior or required change is clearly established, including how the token remains off the frontend.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100