Restricting access to password creation page #2018
-
Hello, I've set up an instance of passwordpusher for my company and i've been asked to make it so only we (so only from a specific IP) are able to create pushes without enabling account creation. My instance is running on docker with an nginx reverse proxy, available on the internet thanks to cloudflare. Is there a feature for this? Does anyone have any ideas about how i could do this? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
pglombardo
Apr 2, 2024
Replies: 1 comment 1 reply
-
Hi @aobxcc the only way currently would be via nginx location deny/allow blocks: server {
listen 80;
server_name example.com;
location / {
# Allow access for localhost
allow 127.0.0.1;
deny all;
# Additional configuration for your website
# ...
}
location ~* ^/(.*)/p/new {
# Allow access for localhost
allow 127.0.0.1;
# Deny access for all other IPs
deny all;
# Additional configuration for the specific URL pattern
# ...
}
location = /p/new {
# Allow access for localhost
allow 127.0.0.1;
# Deny access for all other IPs
deny all;
# Additional configuration for the specific URL
# ...
}
}
Let me know if this helps. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
aobxc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @aobxcc the only way currently would be via nginx location deny/allow blocks: