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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow addding hostname via environment variable #2011

Open
rhuss opened this issue Sep 7, 2019 · 2 comments 路 May be fixed by #2013

Comments

@rhuss
Copy link
Contributor

commented Sep 7, 2019

Are you experiencing this issue in octobox.io or your own instance?

  • octobox.io
  • My instance

馃悶 Problem

When running the latest version of octobox on OpenShift I run into this error:

grafik

The reason is this new Rails feature: https://www.fngtps.com/2019/rails6-blocked-host/

I.e. one would have to add either the hostname of the reverse proxy to this list or enable a full whitelist. Ideally, this could be done via an environment variable (e.g. OCTOBOX_HOSTNAME or OCTOBOX_NO_HOSTAUTHORIZATION)as there is no easy way to edit this configuration file when installing octobox as it is part of the Docker image.

An alternate solution would be to adapt the OpenShift installation to include a local slim reverse proxy which calls rails on localhost. This might be the more generic solution.

@andrew

This comment has been minimized.

Copy link
Member

commented Sep 8, 2019

Env sounds like a good solution for this 馃憤

rhuss added a commit to rhuss/octobox that referenced this issue Sep 8, 2019
fix: Add ALLOW_HOSTNAME and ALLOW_ALL_HOSTNAMES environment variables
This is to allow an octobox setup in an reverse proxy setup and to pass
the hostname check as described in https://www.fngtps.com/2019/rails6-blocked-host/

Also, adapted the OpenShift templates to use ALLOW_ALL_HOSTNAMES as
octobox is shielded by the OpenShift router anyway and does not require
this hostname check.

Fixes octobox#2011.
rhuss added a commit to rhuss/octobox that referenced this issue Sep 9, 2019
fix: Add ALLOW_HOSTNAME and ALLOW_ALL_HOSTNAMES environment variables
This is to allow an octobox setup in an reverse proxy setup and to pass
the hostname check as described in https://www.fngtps.com/2019/rails6-blocked-host/

Also, adapted the OpenShift templates to use ALLOW_ALL_HOSTNAMES as
octobox is shielded by the OpenShift router anyway and does not require
this hostname check.

Fixes octobox#2011.
@acidicX

This comment has been minimized.

Copy link

commented Sep 12, 2019

Same issue on Docker. I'd prefer an ENV solution, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can鈥檛 perform that action at this time.