-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add way to filter IP addresses to be allowed to access #3981
base: master
Are you sure you want to change the base?
Conversation
We suport multiple node version so i dont think its good to add |
Can you replace your |
You can review the code and tell that there by going to Commits tab. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace your typeof ipsToAllow !== "string" with something like this ipsToAllow?.split(',').every(ip => net.isIP(ip))
@freiit Adding IP validation sounds like a good idea! But don't I also need to have the type validation first? For example if I pass
|
One open question - where should I document the flag/env var? I see there is https://github.com/louislam/uptime-kuma/wiki/Environment-Variables but I guess you need to have elevated permissions to modify. |
The wiki is in another repo: https://github.com/louislam/uptime-kuma-wiki Also want to remind that Uptime Kuma is mainly a Socket.io application, express is just part of it. Not sure if Will come back and review in the milestone 2.2.0. |
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Provides a flag to restrict IPs that should be able to access the server by providing a comma seperated arg or env var that can be used to provide an allow list of IP addresses. e.g
A requirement for Home Assistant Ingress is to restrict access.
See: https://developers.home-assistant.io/docs/add-ons/presentation/#ingress
Fixes #(issue)
Type of change
Please delete any options that are not relevant.
Checklist
(including JSDoc for methods)
Screenshots (if any)
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.