bunkerity / bunkerweb

🛡️ Open-source and next-generation Web Application Firewall (WAF)
https://www.bunkerweb.io
GNU Affero General Public License v3.0
6.57k stars 372 forks source link

[BUG] Reverse Proxy Headers UI - Invalid value #1701

Open tgregory86 opened 1 week ago

tgregory86 commented 1 week ago

What happened?

When configuring reverse proxy headers on a services in the UI, the UI reports that that values are invalid and will not allow you to save the config.

How to reproduce?

Configure reverse proxy headers in the UI as directed in the Docs. I have tried different combinations of values and they all report "invalid value" image image image

Configuration file(s) (yaml or .env)

n/a

Relevant log output

n/a

BunkerWeb version

1.5.11

What integration are you using?

Docker

Linux distribution (if applicable)

Ubuntu Server 24.04

Removed private data

Code of Conduct

scetu commented 3 days ago

Just saw this issue today, WebUI does accept comma instead of semicolon, but then NGINX on backend will throw an error because it accepts semicolon.

2024/11/19 09:32:26 [emerg] 4521#4521: invalid number of arguments in "proxy_set_header" directive in /etc/nginx/site.example.org/server-http/reverse-proxy.conf:36

This happens for most fields in WebUI for Reverse Proxy.

TheophileDiot commented 3 days ago

Hi @tgregory86, thank you for opening this issue. Here's the regex for the setting with working examples: https://regex101.com/r/L8xGSj/1

tgregory86 commented 2 days ago

I understand now, you need to leave off the last semicolon, since its automatically appended to the config.