-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Update documentation on endpoint paths starting with /
#782
Comments
Hi @spras, it looks correct to me that you redefine your endpoints because of the custom base url. This behaviour was mostly inspired by how URL's are resolved in the browser. For example, assuming you are on https://example.com/subpage and you have The fact that using I would suggest you to use fully-specified URLs in path configs, because your usecase (I assume) involves going away from Nuxt to an external custom URL. |
I faced the similar issue. Here is my nuxt.config file. Ensure that the origin ends with a ‘/’. This worked for me.
|
@phoenix-ru your explaination make sense , it'OK for me. I think documentation should be more detailed and explicit on it. |
Thank you for the feedback @spras, we will adjust the documentation accordingly |
/
Environment
Darwin
v20.10.0
3.12.2
3.12.0
2.9.6
[email protected]
-
debug
,ssr
,devtools
,runtimeConfig
,modules
,css
,vuetify
,auth
,features
,app
,components
,hooks
,build
[email protected]
,@nuxt/test-utils/[email protected]
,@nuxtjs/[email protected]
,@sidebase/[email protected]
,@vueuse/[email protected]
-
Reproduction
here is my nuxt.config.ts
Describe the bug
I'm currently testing upgrade from 0.7.2 to 0.8.0-rc
This break my config : local provider and auth.baseURL defined to a custom base url ex : https://example.com/
Login is posted to the nuxt base URL , not to my custom base url
As a workaround I had to redefine all the endpoints and removing the / prefix .
Perhaps it has to become the default values ?
It seems to be linked to the modifications for this issue #742 ,
https://github.com/sidebase/nuxt-auth/pull/750/files , joinPathToApiURL function
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: