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

v5.0.0 on Docker: hostname without protocol in resources #8543

Closed
2 tasks done
ghost opened this issue Oct 20, 2020 · 5 comments
Closed
2 tasks done

v5.0.0 on Docker: hostname without protocol in resources #8543

ghost opened this issue Oct 20, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Oct 20, 2020

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

Describe the bug
In v5.0.0 Docker image in a Rancher2 envirnment with tls-terminating nginx ingress some resources like js and css have the hostname without https://, so they won't load.

APP_URL and TRESTED_PROXIES variable are correctly set, v 4.9.x was working right before the upgrade

Screenshots
If applicable, add screenshots to help explain your problem.
image

Server (please complete the following information):

  • Snipe-IT Version: v5.0.0
  • ENV: Official Docker COntainer
@ghost
Copy link
Author

ghost commented Oct 20, 2020

Update: the problem semmes to be that APP_TRUSTED_PROXIES is ignored, because editing config/trustedproxy.php by hand correct the problem.

Anyway in a docker environment this is not the right solution.

@mahdi
Copy link

mahdi commented Oct 20, 2020

Yes, editing /var/www/html/config/trustedproxy.php and uncommenting 'proxies' => '*', will temporarily fix the issue but as @cobra1978 said this issue should be generally fixed.

@fashberg
Copy link
Contributor

Hey!
Same for me.

copying APP_TRUSTED_PROXIES from ENV to settings has been removed at commit 533649f

Diff:
533649f#diff-65b9650370ce063c0ae4c2d172d40fb6aafd2d2e8fe478dae7da21732d4d36dd

removed code:

    'proxies' => env('APP_TRUSTED_PROXIES') !== null ?
        explode(',', env('APP_TRUSTED_PROXIES')) : '*',

Especially for Docker environments we need this ENV settingg

Kind Regards
Folke

@mschmidt291
Copy link

Yes, can also confirm. Running Snipe-IT through our Snipe-IT Helm Chart behind the nginx ingress controller results in css and js loading issues. Uncommenting the line in trustedproxy.php stated above, works fine.

@Sylencer91
Copy link

This doesn't help me. Editing /var/www/html/config/trustedproxy.php and uncommenting 'proxies' => '*', doesn't fix my problem. It is still here. Any Idea?

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

Successfully merging a pull request may close this issue.

4 participants