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

Request to Cancel v2 Redirection for Icons When Using Non-Standard Ports #1113

Closed
chenjuefei opened this issue Apr 23, 2024 · 6 comments
Closed

Comments

@chenjuefei
Copy link

chenjuefei commented Apr 23, 2024

Since updating to version v0.21.0, while using a non-standard port for reverse proxying, all icon links are automatically, resulting in a 302 redirect. This change has disrupted the normal display and functionality of icons. I kindly request reconsideration of this redirection behavior, as it complicates configuration without clear benefits. Feedback on this matter would be greatly appreciated.

@Frooodle
Copy link
Member

non-standard port can you define what you mean by this?

@chenjuefei
Copy link
Author

chenjuefei commented Apr 24, 2024

I apologize for the lack of clarity in my initial description. I'm using Nginx Proxy Manager (NPM) to reverse proxy Stirling-PDF. Due to network configurations, the service port on NPM is set to non-standard ports instead of the typical 80 or 443. For example, accessing https://example.com:2443/site.webmanifest?v=2 results in a 302 redirect to https://example.com/site.webmanifest. I've tried modifying the settings in NPM with proxy_set_header Host $host:2443, but this introduces other issues like mixed content errors. All these problems began with the update to version v0.21.0; everything was working fine before then.

@chenjuefei
Copy link
Author

chenjuefei commented May 20, 2024

After updating to version 0.24.3, I encountered even more issues than expected. I discovered that a large number of CSS and JS files could be subject to 302 redirects. I had no choice but to diligently search for a solution. Finally, I found the following method, and I hope it won't cause any additional problems.

location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|webmanifest)$ {
    expires 1y;
    proxy_pass http://172.20.0.100:8080;
    proxy_redirect http://172.20.0.100:8080 https://example.com:2443;
}

@Thomas-Do
Copy link

I have the same problem. Due to v2 redirections I get 302 and 502 errors for all files that use “?v=2". So, my Stirling-PDF installation is only partly useable because part of the UI is broken.
Due to other services running, I need a complex proxy-setup on my server and I was not yet able to fix this problem.

@chenjuefei
Copy link
Author

Awesome. Version 0.24.5 solved this issue!

@Thomas-Do
Copy link

Thank's for the new version. The proxy works and the UI looks great now!

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

3 participants