-
Notifications
You must be signed in to change notification settings - Fork 0
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
Smibhid UI log not logging correct IP from request #216
Comments
Looking like we might need a reverse proxy in front of the webserver container to add the x-real-ip or x-forwarded-for headers with the real IP. Unless we change to docker host networking @sjefferson99 thoughts? |
What do we need the IP for? |
Currently logging the docker network gateway to the smibhid-ui-log db - tis incorrect, and is annoying. Would be a good thing to fix. A proxy using Steps:
http:// {
reverse_proxy smib-webserver:80
} I will try it as I think this will be beneficial down the line to have the correct IP address logged. Also means we can resolve an IP to the hostname if the client doesn't provide the |
Given the smibhid code does send a hostname and we have no specific plans to add a device that can't, the Ip address seems superfluous. But by all means have a go at working out how to solve with a reverse proxy providing it doesn't add complexity that will make smib less reliable or less secure. |
If anything - it makes it easier to secure the webserver behind https if and when it goes publicly accessible |
Smib (prod) looks to be logging correct ips! Need to establish why |
Working fine on prod smib-pi, not on own pi SMIB-PI: docker 26.1.3 - working |
Believe it's being proxied by docker.
Might be able to add
--proxy-headers
to the unicorn run command on the webserver to pass through the real ip.The text was updated successfully, but these errors were encountered: