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

Allow ips #2998

Merged
merged 2 commits into from
Sep 12, 2023
Merged

Allow ips #2998

merged 2 commits into from
Sep 12, 2023

Conversation

johrstrom
Copy link
Contributor

Fixes #2970 by adding ip addresses to ALLOWED_HOSTS if @servername is nil. (docs say setting servername to nil allows you to use ips)

end

def ip_addresses
Socket.ip_address_list.select(&:ipv4?)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me if we should allow ipv6 addresses.

What's more is, if I do enable ipv6 address - I'm not really sure how to use them. They seem to have the interface name appended to it, so I'm not entirely sure if we need to cut that off or what.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure need to worry too much about what IPs people will get since the best practice is to supply DNS names like ondemand.example.com that correspond to certificate CNs, etc. I think IPv4 is good enough as that's most common.

@@ -78,7 +78,7 @@
#
SetEnv OOD_PUN_STAGE_CMD "sudo /opt/ood/nginx_stage/sbin/nginx_stage"

SetEnv OOD_ALLOWED_HOSTS "example.com"
SetEnv OOD_ALLOWED_HOSTS "8.8.8.8,example.com"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that @proxy_server is never nil because it's populated by the fqdn. So that's why example.com almost always shows up here in OOD_ALLOWED_HOSTS.

@johrstrom johrstrom merged commit af2b58f into master Sep 12, 2023
@johrstrom johrstrom deleted the allow-ips branch September 12, 2023 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authorization issues with Ruby apps for servers without domain names
3 participants