-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Strange proxy behaivior #330
Comments
Some more stange behaivorWhen I add a file to the server middleware:
export default (req, res, next) => {
setTimeout(() => {
next()
}, 2000);
} Navigating to the proxy location somehow works? It did work, so trying older versionsSince it happened after updating the packages I went about and installed older versions of
ConclusionSo I will continue the project on version |
I'm closing this for now - this is an upstream issue as @nuxtjs/proxy isn't yet compatible with nitro. Let's track built-in proxy support in nitropack via nitrojs/nitro#113. |
Environment
Windows_NT
v16.14.2
2.16.0-27358576.777a4b7f
yarn@1.22.11
webpack
head
,css
,plugins
,components
,buildModules
,modules
,axios
,proxy
,build
,bridge
primevue/nuxt
,@nuxtjs/axios@5.13.6
,@nuxtjs/proxy@2.1.0
@nuxt/bridge@3.0.0-27498038.f18e68b
Reproduction
yarn create nuxt-app proxy-test
cd proxy-test
package.json
replace"nuxt": "^2.15.0"
with"nuxt-edge": "latest"
yarn install
yarn add --dev @nuxt/bridge@npm:@nuxt/bridge-edge
package.json
as described in the guidenuxt.config.js
as described in the guideyarn dev
to check it is working.yarn add @nuxtjs/proxy
nuxt.config.js
in themodules
prop:nuxt.config.js
in a newly createdproxy
prop:Tutorial.vue
for speed:yarn dev
and test the proxy:Describe the bug
I encountered this issue after I deleted the
node_modules/
folder andyarn.lock
file and ranyarn install
in an existing project that makes use of Nuxt, Nuxt Bridge and the Proxy. Before I did that it was working fine.So I searched everywhere online if more people have encountered this issue and couldn't find anything similar.
The strange behaviors:
Somehow in our project when hitting the auth proxy it gives random results after using it:
Sometimes gives an 400 (returned from the actual api) and sometimes gives an 404 (returned from nuxt itself?)
Which is the strange behavior.
It worked fine before but after re-installing the node modules it also became incredibly slow for some reason.
When hitting the /proxy/ endpoint in the test project described in reproduction the Laravel project somehow does receive the request:
(Don't worry I did save
web.php
, I just removed other endpoints for censor purposes)Additional context
I'm very confused about what could cause this.
Logs
No response
The text was updated successfully, but these errors were encountered: