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

Replace config name with feature check in go/caddy conditions #262

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gstrauss
Copy link
Collaborator

Replace form.config in template conditionals
Instead, prefer to check output.protocols in template conditionals.

@gstrauss
Copy link
Collaborator Author

Aside: awselb.hbs references PolicyName: Mozilla-{{form.config}}-v5-0. Should we open a separate issue to update this? Do you happen to know what needs to happen to update the two references in that file to Mozilla-{{form.config}}-v5-7?

Instead, prefer to check output.protocols in template conditionals.
@janbrasna
Copy link
Collaborator

For a good laugh here's what worked: janbrasna@9912704 (so I may try looking into why sstls is not available on the output, rather than anything similar;D — or, ofc, exposing the version from sstls to output or via form if we want it there anyways…) — so yeah, noticed it before and tried to look for a quick fix, but will need arch decision first where else we might need it, and add it there properly.

@janbrasna janbrasna changed the title Replace form.config in template conditionals Replace config name with feature check in go/caddy conditions Oct 12, 2024
@gstrauss
Copy link
Collaborator Author

gstrauss commented Oct 13, 2024

For a good laugh here's what worked: janbrasna@9912704 (so I may try looking into why sstls is not available on the output, rather than anything similar;D — or, ofc, exposing the version from sstls to output or via form if we want it there anyways…) — so yeah, noticed it before and tried to look for a quick fix, but will need arch decision first where else we might need it, and add it there properly.

Not pretty code, but if it works, why not? Short-term, I'd prefer to simply change "5.0" to "5.7" and revisit later. Longer-term, I think I'd prefer having state.js use javascript to export a variable with the extracted value rather than the contortions in HandlebarJS templates.

In any case, awselb.hbs is not referencing {{form.config}} in a template conditional, so is not in scope for this PR. The title of this PR ("... in go/caddy conditions") also excludes awselb.

Are the proposed code changes in this PR ready for merge?

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