Replies: 2 comments
-
Hello @sovaru25 You can use SSH tunnel without issues, just make sure that your SERVER_ADDRESS variable is configured with the same hostname or address used to access the web admin. Cheers! |
Beta Was this translation helpful? Give feedback.
-
Thank you for the response! I configured SERVER_ADDRESS=127.0.0.1 as suggested. However, the CSRF verification still fails when accessing the panel via an SSH tunnel with port forwarding, such as https://127.0.0.1:8888. This is because, from Django's perspective, 127.0.0.1 and 127.0.0.1:8888 are seen as different origins, which causes CSRF verification to fail. To address this, would it be possible to allow SERVER_ADDRESS to accept specific ports, or to enable multiple addresses (e.g., 127.0.0.1,127.0.0.1:8888) so that users can add their tunnel-specific ports directly in the CSRF_TRUSTED_ORIGINS settings? This would make it easier to use SSH tunnels without needing additional configurations. |
Beta Was this translation helpful? Give feedback.
-
I would like to express my gratitude for your work on the WireGuard WebAdmin project. I noticed that when trying to access the panel through an SSH tunnel, I encounter a CSRF error: Forbidden (403) CSRF verification failed. Request aborted. This is due to the address from which the connection is made not matching the addresses specified in CSRF_TRUSTED_ORIGINS.
Given the importance of web application security and user convenience, I would like to suggest considering the addition of support for connecting to the panel via SSH tunnels. This would not only enhance security but also allow users to easily access the panel without needing to modify CSRF settings.
Beta Was this translation helpful? Give feedback.
All reactions