eNMS-automation / eNMS

An enterprise-grade vendor-agnostic network automation platform.
https://www.enms.io/
GNU General Public License v3.0
812 stars 162 forks source link

eNMS "/" redirect to "/login" and "/login" to "/dashboard" through http #367

Closed lordofire closed 2 years ago

lordofire commented 2 years ago

Hi there,

I have a question regarding using eNMS in kubernetes. I have configured the ingress nginx and https certificates correctly and everything works well in the docker environment + kubernetes. However, there seems to be a problem on the login redirection. Whenever I use https://<enms-fqdn>/ to access the eNMS, it will prompt a failure like the following:

image

From the http response I received from the client side, I do see that there is a 301 redirect response to http://<enms-fqdn>/login instead of https://<enms-fqdn>/login, leading to the above failure. The same thing happens when I finished logging in and go to the dashboard page, where it returns http://<enms-fqdn>/dashboard instead of https://<enms-fqdn>/dashboard. I do checked the code, and I have tried to configure settings.json by setting the fqdn through address field, but still I'm not able to address this issue.

Please help, thanks.

afourmy commented 2 years ago

There is no problem with the login redirection, it works fine. The redirection is implemented using flask.redirect: whether it uses http or https entirely depends on your environment. The address field in settings.json is only used for the mail notifications and the web SSH feature, not for the standard HTTP stuff, that is handled by Flask. I don't know how to fix your problem, I have no experience with Kubernetes, but eNMS is not the issue.