N
Novu•6mo ago
Dauntless

Login API route causes weirdness in web instance (solved)

Has anyone had an issue where self-hosted works fine on http, but switching to https causes the api to log stuff such as this:
2024-06-14T17:11:04.232350514Z [2024-06-14T17:11:04.232Z] "POST /?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?//?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/api/v1/auth/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
2024-06-14T17:11:04.232350514Z [2024-06-14T17:11:04.232Z] "POST /?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?//?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/?/api/v1/auth/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
I'm behind a traefik reverse proxy. This results in a 431 Request Header Fields Too Large when attempting to log in from the web view. I'm on v 24.1 Solution: Use subdomains rather than paths for each services
4 Replies
Ask Inkeep
Ask Inkeep•6mo ago
Hi @Dauntless, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question. Hmm.. Seems there was an issue processing this question. Please try again or tag a team member.
Dauntless
DauntlessOP•6mo ago
@Dima Grossman Could you have a look at this?
Dima Grossman
Dima Grossman•6mo ago
Hi @Dauntless unfortuently I haven't encountered this behavioud before 😦 How are you running your HTTPS setup?
Dauntless
DauntlessOP•6mo ago
VPS on Hetzner through Coolify. I have a modified docker-compose and my own env vars Would you like to see? Btw, do you know the proxy url is hard coded here?
"start:static:build": "pnpm envsetup:docker && http-server build -p 4200 --proxy http://127.0.0.1:4200?",
"start:static:build": "pnpm envsetup:docker && http-server build -p 4200 --proxy http://127.0.0.1:4200?",
From apps/web/package.json
API_CONTEXT_PATH=api
API_PORT=3008
API_ROOT_URL=https://novu.fotballfeber.com/api
AWS_ACCESS_KEY_ID=test
AWS_SECRET_ACCESS_KEY=test
BROADCAST_QUEUE_CHUNK_SIZE=
DISABLE_USER_REGISTRATION=true
FRONT_BASE_URL=https://novu.fotballfeber.com
GLOBAL_CONTEXT_PATH=
HOST_NAME=https://novu.fotballfeber.com
IS_TOPIC_NOTIFICATION_ENABLED=true
JWT_SECRET=***REDACTED****
LOGGING_LEVEL=debug
MONGO_INITDB_ROOT_PASSWORD=**
MONGO_INITDB_ROOT_USERNAME=**
MONGO_MAX_POOL_SIZE=500
MONGO_MIN_POOL_SIZE=100
MONGO_URL=mongodb://**:**@mongodb:27017/novu-db?authSource=admin
MULTICAST_QUEUE_CHUNK_SIZE=
NEW_RELIC_APP_NAME=NovuFotballFeber
NEW_RELIC_LICENSE_KEY=
NODE_ENV=local
REACT_APP_WS_URL=https://novu.fotballfeber.com
REDIS_CACHE_SERVICE_HOST=
REDIS_CACHE_SERVICE_PORT=6379
REDIS_HOST=redis
REDIS_PASSWORD=
REDIS_PORT=6379
S3_BUCKET_NAME=novu-local
S3_LOCAL_STACK=https://localhost:4566
S3_REGION=us-east-1
SENTRY_DSN=
STORE_ENCRYPTION_KEY=***REDACTED`
WEB_CONTEXT_PATH=
WIDGET_CONTEXT_PATH=widget
WIDGET_EMBED_PATH=https://novu.fotballfeber.com/widget/embed.umd.min.js
WIDGET_URL=https://novu.fotballfeber.com/widget
WS_CONTEXT_PATH=ws
WS_PORT=3002
API_CONTEXT_PATH=api
API_PORT=3008
API_ROOT_URL=https://novu.fotballfeber.com/api
AWS_ACCESS_KEY_ID=test
AWS_SECRET_ACCESS_KEY=test
BROADCAST_QUEUE_CHUNK_SIZE=
DISABLE_USER_REGISTRATION=true
FRONT_BASE_URL=https://novu.fotballfeber.com
GLOBAL_CONTEXT_PATH=
HOST_NAME=https://novu.fotballfeber.com
IS_TOPIC_NOTIFICATION_ENABLED=true
JWT_SECRET=***REDACTED****
LOGGING_LEVEL=debug
MONGO_INITDB_ROOT_PASSWORD=**
MONGO_INITDB_ROOT_USERNAME=**
MONGO_MAX_POOL_SIZE=500
MONGO_MIN_POOL_SIZE=100
MONGO_URL=mongodb://**:**@mongodb:27017/novu-db?authSource=admin
MULTICAST_QUEUE_CHUNK_SIZE=
NEW_RELIC_APP_NAME=NovuFotballFeber
NEW_RELIC_LICENSE_KEY=
NODE_ENV=local
REACT_APP_WS_URL=https://novu.fotballfeber.com
REDIS_CACHE_SERVICE_HOST=
REDIS_CACHE_SERVICE_PORT=6379
REDIS_HOST=redis
REDIS_PASSWORD=
REDIS_PORT=6379
S3_BUCKET_NAME=novu-local
S3_LOCAL_STACK=https://localhost:4566
S3_REGION=us-east-1
SENTRY_DSN=
STORE_ENCRYPTION_KEY=***REDACTED`
WEB_CONTEXT_PATH=
WIDGET_CONTEXT_PATH=widget
WIDGET_EMBED_PATH=https://novu.fotballfeber.com/widget/embed.umd.min.js
WIDGET_URL=https://novu.fotballfeber.com/widget
WS_CONTEXT_PATH=ws
WS_PORT=3002
` If I change from https to http, it works fine, but I get cors error mixed-content on my frontend (Where I'm integrating Novu) Now I'm exposing this to both http and https domains at the same time, and the http urls work, but the https ones causes weird behaviour Let me know what more you need @Dima Grossman I managed to getting running by changing from novu.domain.com/path subdomains like api.novu.domain.com
Want results from more Discord servers?
Add your server