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

Marker requests' Host header is always "localhost" #361

Open
airween opened this issue Sep 26, 2024 · 2 comments · May be fixed by #370
Open

Marker requests' Host header is always "localhost" #361

airween opened this issue Sep 26, 2024 · 2 comments · May be fixed by #370
Labels
enhancement New feature or request

Comments

@airween
Copy link

airween commented Sep 26, 2024

I want to test a custom rule set with a specific pre-configured vhost, which listens on localhost (127.0.0.1).

I added Host header to each test, eg:

          headers:
            User-Agent: "OWASP CRS test agent"
            Host: "my.vhost.com"
            Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
            Content-Type: "application/xml"

The test request is sent with the specified header, but when go-ftw sends the marker requests before and after it, they has "localhost".

So the markers' logs are written to the original log, but the test result is written into the vhost's own log (if there is).

It would be nice if the marker requests also use the Host header like the test itself.

Workaround: use the same error.log for specific vhost as the default.

@fzipi fzipi added the enhancement New feature or request label Oct 10, 2024
@fzipi
Copy link
Member

fzipi commented Oct 12, 2024

Hmmm... but this only works in local mode, right? I mean, go-ftw will be reading local files, in the local host (or mounted filesystem) to know where to find the logs.

@fzipi fzipi linked a pull request Oct 12, 2024 that will close this issue
@airween
Copy link
Author

airween commented Oct 12, 2024

Hmmm... but this only works in local mode, right? I mean, go-ftw will be reading local files, in the local host (or mounted filesystem) to know where to find the logs.

Yes, only in local mode. I would try to use different rule sets for different VHOST's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants