-
Notifications
You must be signed in to change notification settings - Fork 7
proxyBaseURL default should not start with /api
#38
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
Comments
I don't think that's the right way to do this. IMHO, Nuxt Icon also uses the https://github.com/nuxt/icon/blob/1381039a295dd73681e46cb54af45892bb51c3ca/src/module.ts#L81 addServerHandler({
route: `${options.localApiEndpoint || '/api/_nuxt_icon'}/:collection`,
handler: resolver.resolve('./runtime/server/api'),
}) |
/api
OK, got it. Let' use export default defineNuxtConfig({
plausible: {
proxy: true,
proxyBaseEndpoint: '/api/_plausible',
},
}) |
Fixed in 1e229ac. |
Thanks for the quick fix! Just one note: It is now |
Yes, this is intended. The Plausible Tracker library will always call |
I see, thanks for the info! |
IMO the default proxy path should not start with
/api
because this might conflict with existing paths or existing proxy rules. E.g. I proxy everything that starts with '/api' to my external API.I use a lot of modules in my project and none is using the '/api' prefix so I never had a problem until now. E.g. nuxt-icon uses /_nuxt_icon, nuxt-images goes to /_ipx for ipx provider.
Following the consistency of other modules, my suggestion would be to change the default to
/_plausible_event
The text was updated successfully, but these errors were encountered: