Skip to content

Hotfix/http request before use backend#999

Merged
fraenki merged 9 commits intoopnsense:masterfrom
mathiasaerts:hotfix/http-request-before-use-backend
Nov 25, 2018
Merged

Hotfix/http request before use backend#999
fraenki merged 9 commits intoopnsense:masterfrom
mathiasaerts:hotfix/http-request-before-use-backend

Conversation

@mathiasaerts
Copy link
Copy Markdown
Contributor

When adding an HTTP to HTTPS redirect for some URLs in the haproxy configuration, I was getting the warning messages below. use_backend and http-request rules are added to the haproxy frontend section in no specific order.

image

I've adjusted the template so that use_* statements are always last in the frontend section. I tried to simplify the code as much as possible (with my limited Jinja2 knowledge) but perhaps there is a better way. I've also removed some extra newlines to keep the generated config file clean.

I'm running Opnsense 18.7.7 and noticed that the template is a bit different from the master branch. I've made and tested my adjustments with this version before rebasing (dee6c58) with the current master branch (not sure how to test this).

@lennyev

This comment has been minimized.

@fraenki fraenki merged commit 1f9250e into opnsense:master Nov 25, 2018
fraenki added a commit to fraenki/plugins that referenced this pull request Nov 25, 2018
When enabling stats and peers, these two sections git messed up due to
a missing newline.
fraenki added a commit to fraenki/plugins that referenced this pull request Nov 25, 2018
When enabling both stats and peers, these two sections got messed up due to
a missing newline.
@fraenki
Copy link
Copy Markdown
Member

fraenki commented Nov 25, 2018

@mathiasaerts Merged, thanks!

fraenki added a commit to fraenki/plugins that referenced this pull request Nov 25, 2018
When enabling both stats and peers, these two sections got messed up due to
a missing newline.
@mathiasaerts
Copy link
Copy Markdown
Contributor Author

@fraenki Awesome, thanks!

fraenki added a commit to fraenki/plugins that referenced this pull request Jul 24, 2020
@fraenki
Copy link
Copy Markdown
Member

fraenki commented Jul 26, 2020

A small heads-up: the upcoming os-haproxy 2.24 will change this behavior again. It will solely rely on proper sorting of the rules, the special handling of the use_[backend|server] options is removed. See #1925 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants