linuxserver / Heimdall

An Application dashboard and launcher
MIT License
7.88k stars 544 forks source link

Getting 419 error code when trying to add apps. #398

Closed chopfitzroy closed 5 years ago

chopfitzroy commented 5 years ago

Description

When I try to add an application I am redirected to a 419 page with an "Sorry, your session has expired. Please refresh and try again." message.

I am running Heimdal behind a NGINX reverse proxy using nginx-proxy-manager and I have enabled https with the FORCE_HTTPS=true environment variable.

This all works if I navigate to https://mydomain Heimdall show's the dashboard I can just not add any applications from here.

Also as a side note I can also not see an entry in the "Application Type" dropdown for Plex even though I know it is one of the supported applications, what could this be?

Additional Details

My docker-compose.yml config looks like so:

version: "3"
services:
  app:
    image: jc21/nginx-proxy-manager:latest
    restart: unless-stopped
    networks:
      br0:
        ipv4_address: 192.168.1.253
    volumes:
      - ${CONFIG}/npm/config.json:/app/config/production.json
      - ${CONFIG}/npm/data:/data
      - ${CONFIG}/npm/letsencrypt:/etc/letsencrypt

  db:
    build: .
    restart: unless-stopped
    networks:
      br0:
        ipv4_address: 192.168.1.252
    environment:
      MYSQL_ROOT_PASSWORD: "root"
      MYSQL_DATABASE: "npm"
      MYSQL_USER: "npm"
      MYSQL_PASSWORD: "password"
    volumes:
      - ${CONFIG}/data/mysql:/var/lib/mysql

  heimdall:
    image: linuxserver/heimdall:latest
    restart: unless-stopped
    networks:
      br0:
        ipv4_address: 192.168.1.251
    volumes:
      # This mounts a .env with FORCE_HTTPS=true
      - ${ENVIRONMENT}/heimdall/.env:/var/www/localhost/heimdall/.env
      - ${CONFIG}/heimdall:/config
    environment:
      - PGID
      - PUID
      - TZ

  plex:
    image: linuxserver/plex:latest
    restart: unless-stopped
    networks:
      br0:
        ipv4_address: 192.168.1.250
    volumes:
      - ${CONFIG}/plex:/config
      - ${DATA}/TV:/media/tv
      - ${DATA}/Movies:/media/movies
      - ${DATA}/Music:/media/music
      - ${DATA}/Anime:/media/anime
    environment:
      - PGID
      - PUID
      - TZ
      - VERSION=latest

networks:
  br0:
    external: true

And the reverse proxy rules for Heimdall are as pictured:

Capture

KodeStar commented 5 years ago

Try without FORCE_HTTPS=true maybe, that hasn't been required for a while.

chopfitzroy commented 5 years ago

Thank you, this fixed the errors :).