The session ID keeps getting reset.
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 5.1k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Version : 2023.09.11.1010
This is my Nginx configuration.
What's wrong with it?
user nginx;
pid /run/nginx.pid;
worker_processes 2;
worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log crit;
events {
worker_connections 4000;
use epoll;
multi_accept on;
accept_mutex off;
}
http {
log_format main_logs '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'$request_time $upstream_response_time $pipe $upstream_cache_status';
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /dev/stdout main_logs;
server_tokens off;
sendfile on;
tcp_nopush on;
gzip on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;
}
# remotely
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80 default_server;
server_name localhost;
keepalive_timeout 180s;
proxy_read_timeout 120s;
location / {
proxy_pass http://remotely.service:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_send_timeout 30m;
proxy_connect_timeout 3600s;
proxy_read_timeout 30m;
client_max_body_size 10M;
}
location /_blazor {
proxy_pass http://remotely.service:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_send_timeout 30m;
proxy_connect_timeout 3600s;
proxy_read_timeout 30m;
client_max_body_size 10M;
}
location /AgentHub {
proxy_pass http://remotely.service:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_send_timeout 30m;
proxy_connect_timeout 3600s;
proxy_read_timeout 30m;
client_max_body_size 10M;
}
location /ViewerHub {
proxy_pass http://remotely.service:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_send_timeout 30m;
proxy_connect_timeout 3600s;
proxy_read_timeout 30m;
client_max_body_size 10M;
}
location /CasterHub {
proxy_pass http://remotely.service:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_send_timeout 30m;
proxy_connect_timeout 3600s;
proxy_read_timeout 30m;
client_max_body_size 10M;
}
}
I followed the Nginx configuration on GitHub as closely as possible, but I'm encountering an issue where the session ID frequently refreshes.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the posted Nginx configuration and the project's Blazor/SignalR connection setup. Compare the proxy handling for normal and hub requests, then reproduce the session refresh and identify which request loses the session ID. Done means the session ID remains stable through the affected workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, nginx
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100