gotson / komga

Media server for comics/mangas/BDs/magazines/eBooks with API, OPDS and Kobo Sync support
https://komga.org
MIT License
3.85k stars 232 forks source link

Comics in Epub format cannot be opened when using Nginx reverse proxy Komga on a non-80 port #1462

Closed zff233 closed 5 months ago

zff233 commented 5 months ago

Steps to reproduce

1.Use the Nginx reverse proxy Komga,nginx_https listens on port 888,the configuration file: location / { proxy_pass http://ip:3332;(Komga's LAN port) proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-PORT $remote_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Ssl on;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 86400; 
        proxy_ssl_session_reuse on;
    }

2.Use "Mydomain.top:888" to access Komga and open an epub comic 3.At this point, the problem occurs, the comic picture does not appear, and it keeps showing that it is loading. Use the browser tool view, found the request to the server for "https://Mydomain.top/api/v1/books/0FMDBDKYYKKVM/resource/titlepage.xhtml" no port number ": 888", Even though I have configured "proxy_set_header Host $host:$server_port;" or "proxy_set_header Host $http_host;" in Nginx. The host and port number I requested were passed to Komga. b6dd8739a0208771ef94c27b990aa64

Expected behavior

The epub cartoon should open normally and request resources using a Url with a port number

Actual behavior

The requested URL does not have a port attached, so the image cannot be opened; I don't know if this is caused by an error in my Nginx configuration, but I haven't found similar Issues in the past issues, more of an https and http protocol issue.

Logs

No response

Komga version

1.10.4

Operating system

Synology DSM7.0

Installation method

Docker

Other details

No response

Acknowledgements