nginx in rc.12 no more proxy_pass infinity loading
See original GitHub issueEnvironment
- Operating System:
Linux
- Node Version:
v16.13.0
- Nuxt Version:
3.0.0-rc.12
- Nitro Version:
0.6.0
- Package Manager:
npm@8.15.1
- Builder:
vite
- User Config:
modules
,vue
,runtimeConfig
,css
,buildModules
,build
- Runtime Modules:
@nuxtjs/tailwindcss@5.3.5
- Build Modules:
@pinia/nuxt@0.4.3
Reproduction
server
{
listen 80;
listen [::]:80;
server_name site.dev www.site.dev;
location /
{
proxy_pass http://127.0.0.1:3001;
include /etc/nginx/proxy_params;
}
}
params
proxy_buffers 16 32k;
proxy_buffer_size 64k;
proxy_busy_buffers_size 128k;
proxy_cache_bypass $http_pragma $http_authorization;
proxy_connect_timeout 59s;
proxy_hide_header X-Powered-By;
proxy_http_version 1.1;
proxy_ignore_headers Cache-Control Expires;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
proxy_no_cache $http_pragma $http_authorization;
proxy_pass_header Set-Cookie;
proxy_read_timeout 600;
proxy_redirect off;
proxy_send_timeout 600;
proxy_temp_file_write_size 64k;
proxy_set_header Accept-Encoding '';
proxy_set_header Cookie $http_cookie;
proxy_set_header Host $host;
proxy_set_header Proxy '';
proxy_set_header Referer $http_referer;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Original-Request $request_uri;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
Describe the bug
infinity loading.
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:5
- Comments:21 (5 by maintainers)
Top Results From Across the Web
Avoiding the Top 10 NGINX Configuration Mistakes
We help you avoid the 10 most common NGINX configuration errors, explaining the problems caused by each and how to fix them.
Read more >Top 25 Nginx Web Server Best Security Practices - nixCraft
This pages shows how to secure Nginx web server including various hardening approaches and best security on Linux or Unix-like system.
Read more >How to set up an nginx reverse proxy with SSL termination in ...
This guide is going to assume that the reverse proxy will be responsible for maintaining the certificates for all of the servers that...
Read more >unraid write speed - Ozzys Barber Club
Unraid uses parity drives, and does not stripe the data. Im using HP Proliant microserver with AMD Turion 2 Neo Dual core and...
Read more >NginX Proxy Pass Infinite Loop - Stack Overflow
But if I add suffix in location directive, it is fine. location /tracker { proxy_pass http://localhost:8080/tracker; // not infinite loop } ...
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
These
proxy_params
seem to have fixed the infinite loading, but I’m seeing response times of up to 5 seconds in dev environment… (prod build)This seems to have started with this commit (https://github.com/nuxt/framework/commit/5a2616cfee4c3ca2838785536c43d6dcdb780ee8) that added support for early hint rendering (status code 103).
Note the header differences between a direct connection to the nitro server versus an nginx
proxy_pass
I’m sure there’s an ideal
proxy_pass
config to support this, but I frankly just don’t have the patience for it as this feature isn’t important to me. I just ended up disablingexperimental.writeEarlyHints
innuxt.config.ts
:@danielroe It might be a good point to add recommended settings for Nginx (proxy) to the documentation.