Wrong redirect for Files behind reverse proxy

I have an nginx proxy manager that handle my domains and ssl certificates.
The InvoiceNinja App i running on another host with docker compose with the setup described here: GitHub - invoiceninja/dockerfiles: Docker files for Invoice Ninja

env:

APP_URL=https://ininja.domain.org
APP_KEY=base64:somestring
APP_DEBUG=false
REQUIRE_HTTPS=false
PHANTOMJS_PDF_GENERATION=false
PDF_GENERATOR=snappdf
TRUSTED_PROXIES='192.168.179.165' # my local npm

docker compose:

services:
  server:
    image: nginx
    restart: unless-stopped
    env_file: env
    volumes:
      # Vhost configuration
      #- ./config/caddy/Caddyfile:/etc/caddy/Caddyfiledocker-com
      - ./config/nginx/in-vhost.conf:/etc/nginx/conf.d/in-vhost.conf:ro
      - ./docker/app/public:/var/www/app/public:ro
    depends_on:
      - app
    # Run webserver nginx on port 80
    # Feel free to modify depending what port is already occupied
    ports:
      - "8045:80"
      #- "443:443"
    networks:
      - invoiceninja
    extra_hosts:
      - "in5.localhost:192.168.0.124 " #host and ip

  app:
    image: invoiceninja/invoiceninja:5
    env_file: env
    restart: unless-stopped
    volumes:
      - ./config/hosts:/etc/hosts:ro
      - ./docker/app/public:/var/www/app/public:rw,delegated
      - ./docker/app/storage:/var/www/app/storage:rw,delegated
    networks:
      - invoiceninja
      - data_default
    extra_hosts:
      - "in5.localhost:192.168.0.124 " #host and ip

After i updated the docker images to a new version the links to the PDF or other files is wrong. See Screenshot

The App redirect me to a URL with the PORT i configured. If i manually open the link without the Port it works of course. In the customer portal i set the right URL to without port

I cant find the failure. Or i have to configure something in the Reverse Proxy?

i already change the port from 8044 to 8045 but the same behavoir

Hi,

Was the working in a previous version/which version introduced the problem?

@david do you have any suggestions?

I dont know the right version. It could be from 5.5 to 5.6

If you are seeing a port number in the url, it means you reverse proxy config is most likely wrpng

Oh no. I found a solution. It was the Nginx Proxy Manager i think.
After updating the NPM from 2.9.14 to 2.10.3 and save the proxy host the URLs for files and pdf is redirect correctly without port.

I dont change the NPM proxy config itself. And i have no advanced config settings. i only updated the version!