Skip to content
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

Configurable _loading Path for Module Middleware #85

Open
aturingmachine opened this issue Aug 26, 2021 · 4 comments
Open

Configurable _loading Path for Module Middleware #85

aturingmachine opened this issue Aug 26, 2021 · 4 comments

Comments

@aturingmachine
Copy link

Curious as to why the route _loading is not configurable. Seems we can tweak most things about how the loading setup is configured however this route cannot be placed at a different location except via configuring the router base. I am wondering if this is something that could be implemented, and potentially a PR welcomed, or if there is something prohibiting this that I am unaware of.

Server Middleware in question

@pi0
Copy link
Member

pi0 commented Aug 26, 2021

Hi @aturingmachine. Sure we can make it configurable and quickly checking, prefix is not hardcoded anywhere else. PR welcome 👍 (and would be nice if you can also explain why this change is required)

@aturingmachine
Copy link
Author

Hi @aturingmachine. Sure we can make it configurable and quickly checking, prefix is not hardcoded anywhere else. PR welcome 👍 (and would be nice if you can also explain why this change is required)

Awesome, I can take a crack at it later.

We have a very odd use case to be honest. We are using nginx to proxy some of our traffic to our Nuxt stack, however some of that traffic will not be under a basePath. To resolve we have configured all the dev endpoints to be under this psuedo-basePath (webpack hot module, dev server, etc) and the last one I could not figure out was the /_loading/sse call that is made. I am pretty sure the middleware I linked in the OP is the correct endpoint.

@yulinyeh
Copy link

Hi @pi0 and @aturingmachine.
Would it be possible for changing
path: '/_loading', to path: options.baseURL, ?

@aturingmachine
Copy link
Author

@yulinyeh I currently have a PR open (#86) that sets path to options.middlewarePath that has been open for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants