'/api/' path should be configurable
See original GitHub issueThe problem
In my case i’m already running an API at the /api/'
path so this conflicts. Currently the config only allows for editing the base path /api/${options.base}/
Solution
I would make options.base
include the ‘/api/’, so the default would be /api/_content/
. This should also function in combination with the options.sources
Other solution
Other options would be to have a separate config option for the /api/
part.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Configuring an API path - IBM
An API path defines the API operations that are available on a single path. About this task. Provide the following information when you...
Read more >Why you should (almost) never use an absolute path to your ...
My personal advice is: never hardcode absolute paths to your APIs again, unless it is a prototype. Spend a bit more time to...
Read more >How to configure REST API path for PROD environment/QAS ...
I have imported multiple methods from a REST API interface with a base URL in DEV now. Each method under the REST API...
Read more >Best practices for REST API design - Stack Overflow Blog
We shouldn't use verbs in our endpoint paths. Instead, we should use the nouns which represent the entity that the endpoint that we're ......
Read more >Configure relative paths
In the Policy Studio tree, select Listeners > API Gateway -> Default Services > Paths. Right-click Paths, and select Add > Relative Path....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree, i would rather proxy elsewhere, but we may not always have that choice
I would anyway recommend to proxy on another route than
/api
as best practices since Nuxtserver/api/
is already matching to/api
.But happy to chance the base option.