Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cant reach app by ip, when FORCE_HTTPS is enabled #1809

Open
1 task done
alexkutsan opened this issue Jul 29, 2024 · 6 comments
Open
1 task done

[Bug]: Cant reach app by ip, when FORCE_HTTPS is enabled #1809

alexkutsan opened this issue Jul 29, 2024 · 6 comments
Assignees

Comments

@alexkutsan
Copy link

alexkutsan commented Jul 29, 2024

Read the Troubleshooting guide.

  • I have read and followed the Troubleshooting guide

Reproduction steps

  1. setup FORCE_HTTPS=true, APP_URL=https://your.domain
  2. Reach app by http by explicit IP address and port

Expected behavior

App accessible both by http and https, by explicit IP address and by domain

Actual behavior

App accessible only by http on domain name. When trying to reach by explicit IP address - browser complains about CORS issues.

Logs

изображение

Koel version

7.0.8

How did you install Koel?

Official Docker image

Additional information

version: '3'

services:
  koel:
    image: phanan/koel:7.0.8
    depends_on:
      - database
    ports:
      - 26005:80
    environment:
      - DB_CONNECTION=pgsql
      - DB_HOST=database
      - DB_PORT=5432
      - DB_USERNAME=koel
      - DB_PASSWORD=
      - DB_DATABASE=koel
      - FORCE_HTTPS=true
      - APP_URL=https://mydomain.com
    volumes:
      - /var/services/homes/alex/music:/music
      - covers:/var/www/html/public/img/covers
      - search_index:/var/www/html/storage/search-indexes

  database:
    image: postgres:13
    volumes:
      - db:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=koel
      - POSTGRES_USER=koel
      - POSTGRES_PASSWORD=
volumes:
  db:
    driver: local
  covers:
    driver: local
  search_index:
    driver: local
@alexkutsan
Copy link
Author

When I does not setup - FORCE_HTTPS=true - I can't reach app via https because of CORS issues as well.
I need both options because usually I reach the app directly from mobile device in tailscale network, but sometimes need access by domain name through nginx proxy

@phanan
Copy link
Member

phanan commented Jul 29, 2024 via email

@alexkutsan alexkutsan changed the title [Bug]: Cant reach app by I, when FORCE_HTTPS is enabled [Bug]: Cant reach app by ip, when FORCE_HTTPS is enabled Jul 29, 2024
@alexkutsan
Copy link
Author

I can, bu reaching by domain name - is one more hop for proxying traffic via reverse HTTP proxy that is no so good.
So in most cases, I would like to use it in the internal network via HTTP connection in VPN network.

@phanan
Copy link
Member

phanan commented Jul 29, 2024 via email

@alexkutsan
Copy link
Author

I would love to, but does not write in PHP.
The main(and probably only) thing that needs to be done is to avoid loading assets via HTTP if the app was opened by https, even if FORCE_HTTPS is false.

@phanan
Copy link
Member

phanan commented Aug 1, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants