-
Notifications
You must be signed in to change notification settings - Fork 4
Fix/lapi empty response #6
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
base: main
Are you sure you want to change the base?
Conversation
This is more or less a bandage fix and doesn't fix the underlying problem within the module.
Hey, Thanks for the PR ! What do you think about also removing automatically extra That way, the bouncer will work in both case, and it limits the risk of user error. |
Sure, I think that would be a good idea. It would make sense if we simply stored the schema and authority prefix without any trailing slashes inside Some other things to think about:
|
b8c8870
to
e4e0cdb
Compare
e4e0cdb
to
6fbf8ee
Compare
Went ahead and implemented a URL validation check when |
This simply parses the URL string to ensure the prefix contains a scheme and an authority, following the RFC 3986 standard. If the scheme and authority cannot be parsed due to the passed string not following the RFC standard, Apache will fail to start and print an error to logs. The path, query, and fragment are subsequently ignored and a warning gets printed if anything besides the string "/" is found after the authority.
6fbf8ee
to
247d0bc
Compare
http://localhost:8080//v1/decisions?ip=
). Before this patch,crowdsec_proxy()
would returnOK
with the response being the empty string.