[GH-ISSUE #4935] Issue with Admin Panel and GitHub Auth When Using Domain Instead of Public IP #1863

Open
opened 2026-03-16 22:08:58 +03:00 by kerem · 4 comments
Owner

Originally created by @pra-cloud on GitHub (Mar 25, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4935

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Current behavior

I am experiencing an issue where my admin panel is not loading (white screen), and GitHub authentication returns a 404 error when using a domain instead of the public IP in my .env file. However, when I use the public IP, both the OAuth authentication and the admin panel work fine. The issue arises when using NGINX, SSL, and the domain.

Expected Behavior

The admin panel should load properly.

GitHub OAuth authentication should work correctly.

Actual Behavior

The admin panel displays a white screen.

GitHub authentication fails with a 404 error.### ****

Steps to reproduce

Configure the .env file with the domain (hoppscotch.hyperzod.dev).

Deploy the application using NGINX and SSL.

Attempt to access the admin panel (https://hoppscotch.hyperzod.dev/admin).

Attempt to authenticate using GitHub OAuth.

Observe that the admin panel does not load and GitHub authentication fails with a 404 error.

Logs and Screenshots


Environment

Production

Hoppscotch Version

Self-hosted

Interceptor

Browser - Web App

Browsers Affected

Chrome

Operating System

Linux

Additional Information

Environment Variables

Not Working Configuration (Using Domain):

DATABASE_URL=postgresql://postgres:pass@172.17.0.1:5432/postgres
HOPP_AIO_ALTERNATE_PORT=80
JWT_SECRET=gAIQE8XVwJUt1tuBfsM3fg0H5LK7um9UWqxJ4wd
TOKEN_SALT_COMPLEXITY=10
MAGIC_LINK_TOKEN_VALIDITY=3
REFRESH_TOKEN_VALIDITY=604800000
ACCESS_TOKEN_VALIDITY=86400000
SESSION_SECRET=gAIQE8XVwJEERFEREg
ALLOW_SECURE_COOKIES=true
DATA_ENCRYPTION_KEY=7dIZmrLxxwMJUP/unPydEX3rud84LLd0
REDIRECT_URL=https://hoppscotch.hyperzod.dev/
WHITELISTED_ORIGINS=https://hoppscotch.hyperzod.dev/backend,https://hoppscotch.hyperzod.dev/,https://hoppscotch.hyperzod.dev/admin
VITE_ALLOWED_AUTH_PROVIDERS=GITHUB
GITHUB_CLIENT_ID=Ov23liEHoRAv
GITHUB_CLIENT_SECRET=b4e15b453b503301686298f488f
GITHUB_CALLBACK_URL=https://hoppscotch.hyperzod.dev/backend/v1/auth/github/callback
GITHUB_SCOPE=user:email
MAILER_SMTP_ENABLE=true
MAILER_USE_CUSTOM_CONFIGS=false
MAILER_ADDRESS_FROM=pm68199@gmail.com
MAILER_SMTP_URL=smtp://172.17.0.1:1025
VITE_BASE_URL=https://hoppscotch.hyperzod.dev
VITE_ADMIN_URL=https://hoppscotch.hyperzod.dev/admin
VITE_BACKEND_GQL_URL=https://hoppscotch.hyperzod.dev/backend/graphql
VITE_BACKEND_WS_URL=wss://hoppscotch.hyperzod.dev/backend/graphql
VITE_BACKEND_API_URL=https://hoppscotch.hyperzod.dev/backend/v1
ENABLE_SUBPATH_BASED_ACCESS=false

Working Configuration (Using Public IP):

DATABASE_URL=postgresql://postgres:testpass@172.17.0.1:5432/postgres
HOPP_AIO_ALTERNATE_PORT=80
JWT_SECRET=gAIQE8XVwJUt1tuBfsM3fg0H5LK7um9UWqxJ4wd
TOKEN_SALT_COMPLEXITY=10
MAGIC_LINK_TOKEN_VALIDITY=3
REFRESH_TOKEN_VALIDITY=604800000
ACCESS_TOKEN_VALIDITY=86400000
SESSION_SECRET=gAIQE8XVwJEERFEREg
ALLOW_SECURE_COOKIES=false
DATA_ENCRYPTION_KEY=7dIZmrLxxwMJUP/unPydEX3rud84LLd0
REDIRECT_URL=http://4.188.239.153:3000
WHITELISTED_ORIGINS=http://4.188.239.153:3170,http://4.188.239.153:3000,http://4.188.239.153:3100
VITE_ALLOWED_AUTH_PROVIDERS=GITHUB
GITHUB_CLIENT_ID=Ov23li1hmH2v4MgR
GITHUB_CLIENT_SECRET=c3f7fa3f58965186b66ecd3637fb4173e4
GITHUB_CALLBACK_URL=http://4.188.239.153:3170/v1/auth/github/callback
GITHUB_SCOPE=user:email
MAILER_SMTP_ENABLE=true
MAILER_USE_CUSTOM_CONFIGS=false
MAILER_ADDRESS_FROM=pm68199@gmail.com
MAILER_SMTP_URL=smtp://172.17.0.1:1025
VITE_BASE_URL=http://4.188.239.153:3000
VITE_ADMIN_URL=http://4.188.239.153:3100
VITE_BACKEND_GQL_URL=http://4.188.239.153:3170/graphql
VITE_BACKEND_WS_URL=wss://4.188.239.153:3170/graphql
VITE_BACKEND_API_URL=http://4.188.239.153:3170/v1
ENABLE_SUBPATH_BASED_ACCESS=false

Additional Context

I am using NGINX as a reverse proxy with SSL enabled.

The issue seems to be related to how requests are handled when using a domain with SSL.

NGINX CONF

server {
listen 80;
server_name hoppscotch.hyperzod.dev;
return 301 https://$host$request_uri;
}

server {
listen 443 ssl;
server_name hoppscotch.hyperzod.dev;

ssl_certificate /etc/letsencrypt/live/hoppscotch.hyperzod.dev/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/hoppscotch.hyperzod.dev/privkey.pem;

# Increase timeout to handle potential slow responses
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
send_timeout 600s;

location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

location /admin {
    proxy_pass http://127.0.0.1:3100;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

location /backend {
    proxy_pass http://127.0.0.1:3170;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}



error_log /var/log/nginx/hoppscotch_error.log;
access_log /var/log/nginx/hoppscotch_access.log;

}

Nginx Error Logs :-

2025/03/25 10:12:41 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /admin/ HTTP/1.1", upstream: "http://127.0.0.1:3100/admin/", host: "hoppscotch.hyperzod.dev"
2025/03/25 10:12:41 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /sw.js HTTP/1.1", upstream: "http://127.0.0.1:3000/sw.js", host: "hoppscotch.hyperzod.dev", referrer: "https://hoppscotch.hyperzod.dev/sw.js"
2025/03/25 10:12:42 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /sw.js HTTP/1.1", upstream: "http://127.0.0.1:3000/sw.js", host: "hoppscotch.hyperzod.dev", referrer: "https://hoppscotch.hyperzod.dev/sw.js"
2025/03/25 10:12:43 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /admin/ HTTP/1.1", upstream: "http://127.0.0.1:3100/admin/", host: "hoppscotch.hyperzod.dev"
2025/03/25 10:12:44 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /sw.js HTTP/1.1", upstream: "http://127.0.0.1:3000/sw.js", host: "hoppscotch.hyperzod.dev", referrer: "https://hoppscotch.hyperzod.dev/sw.js"
2025/03/25 10:12:44 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "POST /backend/graphql HTTP/1.1", upstream: "http://127.0.0.1:3170/backend/graphql", host: "hoppscotch.hyperzod.dev", referrer: "https://hoppscotch.hyperzod.dev/"
2025/03/25 10:12:47 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /sw.js HTTP/1.1", upstream: "http://127.0.0.1:3000/sw.js", host: "hoppscotch.hyperzod.dev", referrer: "https://hoppscotch.hyperzod.dev/sw.js"

Originally created by @pra-cloud on GitHub (Mar 25, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4935 ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Current behavior I am experiencing an issue where my admin panel is not loading (white screen), and GitHub authentication returns a 404 error when using a domain instead of the public IP in my .env file. However, when I use the public IP, both the OAuth authentication and the admin panel work fine. The issue arises when using NGINX, SSL, and the domain. Expected Behavior The admin panel should load properly. GitHub OAuth authentication should work correctly. Actual Behavior The admin panel displays a white screen. GitHub authentication fails with a 404 error.### **** ### Steps to reproduce Configure the .env file with the domain (hoppscotch.hyperzod.dev). Deploy the application using NGINX and SSL. Attempt to access the admin panel (https://hoppscotch.hyperzod.dev/admin). Attempt to authenticate using GitHub OAuth. Observe that the admin panel does not load and GitHub authentication fails with a 404 error. ### Logs and Screenshots ```shell ``` ### Environment Production ### Hoppscotch Version Self-hosted ### Interceptor Browser - Web App ### Browsers Affected Chrome ### Operating System Linux ### Additional Information ### Environment Variables **Not Working Configuration (Using Domain):** DATABASE_URL=postgresql://postgres:pass@172.17.0.1:5432/postgres HOPP_AIO_ALTERNATE_PORT=80 JWT_SECRET=gAIQE8XVwJUt1tuBfsM3fg0H5LK7um9UWqxJ4wd TOKEN_SALT_COMPLEXITY=10 MAGIC_LINK_TOKEN_VALIDITY=3 REFRESH_TOKEN_VALIDITY=604800000 ACCESS_TOKEN_VALIDITY=86400000 SESSION_SECRET=gAIQE8XVwJEERFEREg ALLOW_SECURE_COOKIES=true DATA_ENCRYPTION_KEY=7dIZmrLxxwMJUP/unPydEX3rud84LLd0 REDIRECT_URL=https://hoppscotch.hyperzod.dev/ WHITELISTED_ORIGINS=https://hoppscotch.hyperzod.dev/backend,https://hoppscotch.hyperzod.dev/,https://hoppscotch.hyperzod.dev/admin VITE_ALLOWED_AUTH_PROVIDERS=GITHUB GITHUB_CLIENT_ID=Ov23liEHoRAv GITHUB_CLIENT_SECRET=b4e15b453b503301686298f488f GITHUB_CALLBACK_URL=https://hoppscotch.hyperzod.dev/backend/v1/auth/github/callback GITHUB_SCOPE=user:email MAILER_SMTP_ENABLE=true MAILER_USE_CUSTOM_CONFIGS=false MAILER_ADDRESS_FROM=pm68199@gmail.com MAILER_SMTP_URL=smtp://172.17.0.1:1025 VITE_BASE_URL=https://hoppscotch.hyperzod.dev VITE_ADMIN_URL=https://hoppscotch.hyperzod.dev/admin VITE_BACKEND_GQL_URL=https://hoppscotch.hyperzod.dev/backend/graphql VITE_BACKEND_WS_URL=wss://hoppscotch.hyperzod.dev/backend/graphql VITE_BACKEND_API_URL=https://hoppscotch.hyperzod.dev/backend/v1 ENABLE_SUBPATH_BASED_ACCESS=false ### Working Configuration (Using Public IP): DATABASE_URL=postgresql://postgres:testpass@172.17.0.1:5432/postgres HOPP_AIO_ALTERNATE_PORT=80 JWT_SECRET=gAIQE8XVwJUt1tuBfsM3fg0H5LK7um9UWqxJ4wd TOKEN_SALT_COMPLEXITY=10 MAGIC_LINK_TOKEN_VALIDITY=3 REFRESH_TOKEN_VALIDITY=604800000 ACCESS_TOKEN_VALIDITY=86400000 SESSION_SECRET=gAIQE8XVwJEERFEREg ALLOW_SECURE_COOKIES=false DATA_ENCRYPTION_KEY=7dIZmrLxxwMJUP/unPydEX3rud84LLd0 REDIRECT_URL=http://4.188.239.153:3000 WHITELISTED_ORIGINS=http://4.188.239.153:3170,http://4.188.239.153:3000,http://4.188.239.153:3100 VITE_ALLOWED_AUTH_PROVIDERS=GITHUB GITHUB_CLIENT_ID=Ov23li1hmH2v4MgR GITHUB_CLIENT_SECRET=c3f7fa3f58965186b66ecd3637fb4173e4 GITHUB_CALLBACK_URL=http://4.188.239.153:3170/v1/auth/github/callback GITHUB_SCOPE=user:email MAILER_SMTP_ENABLE=true MAILER_USE_CUSTOM_CONFIGS=false MAILER_ADDRESS_FROM=pm68199@gmail.com MAILER_SMTP_URL=smtp://172.17.0.1:1025 VITE_BASE_URL=http://4.188.239.153:3000 VITE_ADMIN_URL=http://4.188.239.153:3100 VITE_BACKEND_GQL_URL=http://4.188.239.153:3170/graphql VITE_BACKEND_WS_URL=wss://4.188.239.153:3170/graphql VITE_BACKEND_API_URL=http://4.188.239.153:3170/v1 ENABLE_SUBPATH_BASED_ACCESS=false Additional Context I am using NGINX as a reverse proxy with SSL enabled. The issue seems to be related to how requests are handled when using a domain with SSL. ### NGINX CONF server { listen 80; server_name hoppscotch.hyperzod.dev; return 301 https://$host$request_uri; } server { listen 443 ssl; server_name hoppscotch.hyperzod.dev; ssl_certificate /etc/letsencrypt/live/hoppscotch.hyperzod.dev/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/hoppscotch.hyperzod.dev/privkey.pem; # Increase timeout to handle potential slow responses proxy_connect_timeout 600s; proxy_send_timeout 600s; proxy_read_timeout 600s; send_timeout 600s; location / { proxy_pass http://127.0.0.1:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location /admin { proxy_pass http://127.0.0.1:3100; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location /backend { proxy_pass http://127.0.0.1:3170; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } error_log /var/log/nginx/hoppscotch_error.log; access_log /var/log/nginx/hoppscotch_access.log; } ### Nginx Error Logs :- 2025/03/25 10:12:41 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /admin/ HTTP/1.1", upstream: "http://127.0.0.1:3100/admin/", host: "hoppscotch.hyperzod.dev" 2025/03/25 10:12:41 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /sw.js HTTP/1.1", upstream: "http://127.0.0.1:3000/sw.js", host: "hoppscotch.hyperzod.dev", referrer: "https://hoppscotch.hyperzod.dev/sw.js" 2025/03/25 10:12:42 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /sw.js HTTP/1.1", upstream: "http://127.0.0.1:3000/sw.js", host: "hoppscotch.hyperzod.dev", referrer: "https://hoppscotch.hyperzod.dev/sw.js" 2025/03/25 10:12:43 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /admin/ HTTP/1.1", upstream: "http://127.0.0.1:3100/admin/", host: "hoppscotch.hyperzod.dev" 2025/03/25 10:12:44 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /sw.js HTTP/1.1", upstream: "http://127.0.0.1:3000/sw.js", host: "hoppscotch.hyperzod.dev", referrer: "https://hoppscotch.hyperzod.dev/sw.js" 2025/03/25 10:12:44 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "POST /backend/graphql HTTP/1.1", upstream: "http://127.0.0.1:3170/backend/graphql", host: "hoppscotch.hyperzod.dev", referrer: "https://hoppscotch.hyperzod.dev/" 2025/03/25 10:12:47 [error] 73543#73543: *124 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 49.36.212.127, server: hoppscotch.hyperzod.dev, request: "GET /sw.js HTTP/1.1", upstream: "http://127.0.0.1:3000/sw.js", host: "hoppscotch.hyperzod.dev", referrer: "https://hoppscotch.hyperzod.dev/sw.js"
Author
Owner

@pra-cloud commented on GitHub (Mar 25, 2025):

@strepon please help

<!-- gh-comment-id:2751851106 --> @pra-cloud commented on GitHub (Mar 25, 2025): @strepon please help
Author
Owner

@mirarifhasan commented on GitHub (Mar 25, 2025):

@pra-cloud
Could you try setting ENABLE_SUBPATH_BASED_ACCESS=true, then stop the backend container and start it again?.

<!-- gh-comment-id:2752733034 --> @mirarifhasan commented on GitHub (Mar 25, 2025): @pra-cloud Could you try setting `ENABLE_SUBPATH_BASED_ACCESS=true`, then stop the backend container and start it again?.
Author
Owner

@pra-cloud commented on GitHub (Mar 26, 2025):

@mirarifhasan
I am using an AIO container,
docker run -p 3000:3000 -p 3100:3100 -p 3170:3170 --env-file .env --restart unless-stopped hoppscotch/hoppscotch:latest

<!-- gh-comment-id:2753409666 --> @pra-cloud commented on GitHub (Mar 26, 2025): @mirarifhasan I am using an AIO container, docker run -p 3000:3000 -p 3100:3100 -p 3170:3170 --env-file .env --restart unless-stopped hoppscotch/hoppscotch:latest
Author
Owner

@gourav3255 commented on GitHub (Apr 8, 2025):

I am also facing the issue after Google Oauth am not able to login to admin portal again on the same page to asking for sign-in.

<!-- gh-comment-id:2786119453 --> @gourav3255 commented on GitHub (Apr 8, 2025): I am also facing the issue after Google Oauth am not able to login to admin portal again on the same page to asking for sign-in.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1863
No description provided.