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

add kuma ATTACHMENT_ORIGIN setting #623

Merged
merged 2 commits into from
Oct 26, 2017
Merged

add kuma ATTACHMENT_ORIGIN setting #623

merged 2 commits into from
Oct 26, 2017

Conversation

escattone
Copy link
Contributor

Companion PR to mdn/kuma#4479.

@escattone escattone added the WIP label Oct 25, 2017
@escattone escattone changed the title add kuma UNTRUSTED_HOSTS setting add kuma ATTACHMENT_ORIGIN setting Oct 25, 2017
@escattone escattone removed the WIP label Oct 25, 2017
Copy link
Contributor

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

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

👍 with one issue around blank environments

I tested on the prod environments by modifying make k8s-web to just run j2. I then tried with the stage environment, which still had KUMA_ATTACHMENT_ORIGIN defined from prod. I then ran export KUMA_ATTACHMENT_ORIGIN= and tried again, and got a blank value for ATTACHMENT_ORIGIN.

Also, I just remembered we had a staging environment where we could test this stuff.

@@ -33,6 +33,8 @@
value: "{{ KUMA_ALLOWED_HOSTS }}"
- name: ATTACHMENT_HOST
value: {{ KUMA_ATTACHMENT_HOST }}
- name: ATTACHMENT_ORIGIN
value: {{ KUMA_ATTACHMENT_ORIGIN | default(KUMA_ATTACHMENT_HOST) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use:

value: {{ KUMA_ATTACHMENT_ORIGIN | default(KUMA_ATTACHMENT_HOST, True) }}

This way, a blank string also defaults to KUMA_ATTACHMENT_HOST

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch! That issue has bit me in the past with these configs, so I should have been more vigilant about it!

Copy link
Contributor

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

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

👍

@jwhitlock jwhitlock merged commit 6c3f686 into mozmeao:master Oct 26, 2017
@escattone escattone deleted the rj-add-untrusted-hosts-setting branch October 26, 2017 17:33
@jwhitlock jwhitlock added MDN and removed MDN labels Nov 3, 2017
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.

2 participants