Skip to content
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

Environment variables for default port and bind address #342

Merged
merged 4 commits into from
Aug 2, 2024

Conversation

Radical-Egg
Copy link
Contributor

Hi,

There is not an open issue for this but I ran into an issue where I could not change the default port or bind address for snappass. In my case I installed via pip and wanted to bind snappass to 127.0.0.1 as I am planning to use a reverse proxy to reach the app. Is it possible to add the following two environment variables?

BIND_ADDRESS = 127.0.0.1
PORT = 6000

I tested that with no environment variables set, the defaults of 0.0.0.0:5000 are set and working. Given the following variables

BIND_ADDRESS = 127.0.0.1
PORT = 6000
HOST_OVERIDE = example.com

I can reach the app and links are generated with the appropriate URL.

ps. This is my first time submitting a PR, I apologize if I am missing anything.

Thanks all!

README.rst Show resolved Hide resolved
yurushao and others added 3 commits April 17, 2024 16:19
Prefix bind address and port with SNAPPASS_
update readme to prefix SNAPPASS_ to bind address and port
@yurushao yurushao merged commit 9e43578 into pinterest:master Aug 2, 2024
@yurushao
Copy link
Contributor

yurushao commented Aug 2, 2024

@Radical-Egg Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants