mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 09:46:00 +03:00
[GH-ISSUE #1040] Admin panel login redirect #736
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#736
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SinTh0r4s on GitHub (Jul 2, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1040
Subject of the issue
Hi,
I am using a Bitwarden_RS instance on my personal host behind a nginx reverse proxy for HTTPS. Let's Encrpyt. All that good stuff. Now i am looking into hardening my installation before i go live. As part of that I configured my nginx to block every public access to the /admin/ subdirectory.
This works like intended. If i try to access
https://bitwarden.public.dns/admini am greeted with a 403 warning. So far so good.I am still able to access the admin panel locally by accessing
https://bitwarden.local/admin. Now i enter my token and pressenter. Then i get redirected tohttps://bitwarden.public.dns/adminand receive a 403. If i change the address tohttps://bitwarden.local/adminagain i can use the admin panel without problems.The same thing happens when i log out of the admin panel (although it does not bother me in that case).
Is it possible to stop that redirecting to the public dns after login? After all it is just for convenience.
Great project! Love it!
SinTh0r4s
My environment
@Mte90 commented on GitHub (Jul 27, 2020):
I have a similar problem.
Domain: https://dev.domain.tld/bitwarden/admin
After entering the password: https://dev.domain/admin
@wcjxixi commented on GitHub (Oct 12, 2020):
incorrect nginx reverse proxy configuration
Replace with:
reference https://github.com/dani-garcia/bitwarden_rs/wiki/Proxy-examples Nginx (by shauder)
@Mte90 commented on GitHub (Oct 12, 2020):
I have the issue with apacheand as I can see in the wiki this parameters for nginx already exists.
@BlackDex commented on GitHub (Oct 12, 2020):
The redirect is done based upon the
DOMAINsetting you have configured.So, in the case where it redirects to a wrong place that value is configured wrong.
In the other case, i can understand the multi-tld stuff. I could look into using the actual host for this instead of the configured DOMAIN.
@Mte90 commented on GitHub (Oct 12, 2020):
In my case is multihost installation in a subfolder and the domain is configured right
@BlackDex commented on GitHub (Oct 12, 2020):
But with multi host you can only configure one host/domain in the config. And that is where the Redirect is pointing you to.
@BlackDex commented on GitHub (Nov 18, 2020):
Closing this ticket because of inactivity.
Feel free to continue this discussion on the forum: https://bitwardenrs.discourse.group/
@Mte90 commented on GitHub (Nov 18, 2020):
I still have the issue, so I don't know how to keep the discussion moving on as the problem persist.
@BlackDex commented on GitHub (Nov 18, 2020):
Well i have tested this my self just right now, and i can't reproduce this issue.
I tested this with nginx and it works without any strange redirect issues.
Also, i saw that there was no example for nginx available at the Proxy Examples, so i added this.
Please see: https://github.com/dani-garcia/bitwarden_rs/wiki/Proxy-examples ->
Nginx with sub-path (by BlackDex)@Mte90 commented on GitHub (Nov 19, 2020):
In my case the TLD was missing in the settings so I fixed it but the admin is like this:

I am using "Apache in a sub-location" setting.
@BlackDex commented on GitHub (Nov 19, 2020):
@Mte90 did you also added the correct sub-path into the DOMAIN variable? So like
https://my-domain.tld/bitwarden/?@blackw1ng commented on GitHub (Mar 5, 2021):
Hey, to continue on that one..
I used the apache2-sublocation stencil from the wiki - which does not mention
DOMAIN.In case I do not set this env, i can get the
/bitwarden/working :)However
/bitwarden/admin/does not really work.First of all tries to load resources from
/bwrs_static/.A simple
RewriteRule ^/bwrs_static/(.*) /bitwarden/bwrs_static/$1 [R=302,L]fixes at least the layout.Entering the correct password results in first a POST (with a set token), next a 303, then again a GET on the
/bitwarden/admin- so no login happens :(In case an incorrect password is entered, the yellow banner appears - so at least it seems, that the token is verified.
Setting
DOMAIN="https://xyz/bitwarden/admin"orDOMAIN="https://xyz/bitwarden/admin/"results in a 404 from rocket...