text: Title: Reverse proxy: Contradictory scheme headers
  Body: ### Deployment Method
  
  - [ ] Installer
  - [ ] Docker Development
  - [ ] Docker Production
  - [ ] Bare metal Development
  - [ ] Bare metal Production
  - [ ] Digital Ocean image
  - [x] Other (please provide a link `Steps to Reproduce`
  
  ### Describe the problem*
  
  First I would like to apologize for being a completely lost n00b. I'm clearly out of my depth here. I have spun up multiple docker containers and LXCs in the past, and reverse-proxied them successfully with Linuxserver's SWAG container with extremely minimal config, but there is something going WAY over my head here. My config resulted in "Bad Request; Contradictory scheme headers", and everything I did just seemed to make the situation worse until I restored from backups.
  
  ### Steps to Reproduce
  
  1. Install [Inventree LXC via Proxmox Helper Scripts](https://community-scripts.github.io/ProxmoxVE/scripts?id=inventree) (Not sure if they're using the installer script or their own script for a bare metal install. I've looked at their script source and it's all black magic to me; I guess the script somehow is importing more steps from somewhere else because as far as I comprehend the linked script source seems to do basically nothing.)
  2. Inventree is working fine at http://192.168.43.157 (aside from seemingly defaulting to CUI instead of PUI and I can't seem to figure out how to change that default yet, but that's tangential to this post).
  3. Use [LinuxServer's SWAG container](https://docs.linuxserver.io/general/swag/) along with the [Cloudflared mod](https://github.com/linuxserver/docker-mods/tree/universal-cloudflared) to perform reverse-proxying including automatically getting LetsEncrypt cert, setting DNS records, and configuring Cloudflare tunnel. There is an [example of how they do this on their blog](https://www.linuxserver.io/blog/zero-trust-hosting-and-reverse-proxy-via-cloudflare-swag-and-authelia) but I don't use the additional authentication layer (eg. authelia) yet.
  4. The container provides prebuilt proxy confs for many selfhosted services, but unfortunately not Inventree. I've created my own confs based on their [sample subdomain conf](https://github.com/linuxserver/reverse-proxy-confs/blob/master/_template.subdomain.conf.sample) without any issues before. Here's my inventree.subdomain.conf:
  
  ```
  ## Version 2024/07/16
  # Basically just the example conf
  
  server {
      listen 443 ssl;
      listen [::]:443 ssl;
  
      server_name inventree.*;
  
      include /config/nginx/ssl.conf;
  
      client_max_body_size 0;
  
      location / {
  
          include /config/nginx/proxy.conf;
          include /config/nginx/resolver.conf;
          set $upstream_app 192.168.43.157;
          set $upstream_port 80;
          set $upstream_proto http;
          proxy_pass $upstream_proto://$upstream_app:$upstream_port;
  
      }
  
  }
  
  ```
  5. Reload nginx and fail utterly to load the site externally
  6. Read documentation, Reddit, Github discourse, make various changes to nginx proxy conf and/or Inventree config.yaml, see site get progressively more broken with each change
  7. Restore LXC from last night's working backup so it's at least accessible by IP again
  8. Sheepishly post on Github and hope someone is willing to help
  
  ### Relevant log output
  
  ```bash
  Bad Request
  Contradictory scheme headers
  ```