Bubka / 2FAuth

A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
https://docs.2fauth.app/
GNU Affero General Public License v3.0
2.28k stars 152 forks source link

Reverse prox does not work - Nginx proxy manager #266

Closed marlowleon closed 10 months ago

marlowleon commented 10 months ago

Version

5.0.1

Details & Steps to reproduce

After the update of 5.0,, just a blank white page loads on any browser. Can still access the port internally just not external with reverse proxy. No settings have been changed on Nginx side

just did update to 5.0.1 and same issue occurs

Expectation

Page should load but it does now

Error & Logs

No response

Execution environment

No response

Containerization

Additional information

Unraid

tevenfeng commented 10 months ago

Getting the same problem in Unraid with frp tunneling image A problem with port in the url?

Bubka commented 10 months ago

Hi, Please try:

(see https://github.com/Bubka/2FAuth/issues/261#issuecomment-1867753989)

Also, how did you set APP_URL? Did you append the port and if so, is this the proxy port or the web server port?

dwolfuk40 commented 10 months ago

Hi, Please try:

  • Set TRUSTED_PROXIES to * or to your proxy ip address
  • Set ASSET_URL=https://your.2fauth.instance (like APP_URL)

This worked for me thanks. I was also suffering the white page on reverse proxy after update but this cured it :)

marlowleon commented 10 months ago

Hi, Please try:

  • Set TRUSTED_PROXIES to * or to your proxy ip address
  • Set ASSET_URL=https://your.2fauth.instance (like APP_URL)

(see #261 (comment))

Also, how did you set APP_URL? Did you append the port and if so, is this the proxy port or the web server port?

So on unraid I had to add those variables since the template does not have that option to edit the asset url or the proxy but looks like the issue was the asset url being added that fixed the issue. Thanks!