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

Snipe-it doesn't work after proxy #9432

Closed
konstantin-921 opened this issue Apr 14, 2021 · 2 comments
Closed

Snipe-it doesn't work after proxy #9432

konstantin-921 opened this issue Apr 14, 2021 · 2 comments

Comments

@konstantin-921
Copy link

konstantin-921 commented Apr 14, 2021

Please confirm you have done the following before posting your bug report:

Describe the bug
I am trying to deploy snipe-it helm chart on my kubernetes cluster.

Some resources like js and css have the hostname without https://, so they won't load. Any changes to APP_URL have no effect. Command "echo $APP_URL" returns value from values.yml as expected, but this has no effect on the actual URL.

Nginx proxy dont rewrite queries.

server {
  server_name snipeit-fl.mydomain.com;
  listen 10.0.10.10:80;
  listen 10.0.10.10:443 ssl;

  add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";

  client_max_body_size 1024m;
  proxy_read_timeout 3000s;

  ssl_session_cache    shared:SSL:10m;
  ssl_session_timeout  10m;

  ssl_protocols TLSv1.2;

  resolver 8.8.4.4 8.8.8.8 valid=300s;
  resolver_timeout 10s;

  ssl_prefer_server_ciphers on;

  ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-
  ssl_dhparam /etc/ssl/private/dhparams.pem;

  ssl_certificate<----->/etc/nginx/ssl/my.crt;
  ssl_certificate_key<->/etc/nginx/ssl/my.key;

  location / {
    more_clear_headers Server;
    proxy_pass http://cluster_1/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Protocol $scheme;
    proxy_set_header X-Forwarded-Proto $scheme;
  }

}

Related issues - #8543, #4685

Variables are set.
APP_URL=https://snipeit-fl.mydomain.com
APP_TRUSTED_PROXIES=0.0.0.0/0

Screenshots
Selection_002

Server (please complete the following information):

  • Snipe-IT Version: v5.1.3
  • OS: Ubuntu in Docker container
@welcome
Copy link

welcome bot commented Apr 14, 2021

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@snipe
Copy link
Owner

snipe commented Apr 14, 2021

Duplicate of #9179

@snipe snipe marked this as a duplicate of #9179 Apr 14, 2021
@snipe snipe closed this as completed Apr 14, 2021
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