Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

The documentation referenced the outdated req.URL.Host field accessor. CrowdSec uses req.Host directly to access the HTTP request's host information.

Changes

Updated 9 occurrences across documentation versions (current, v1.6, v1.7):

  • appsec/hooks.md - FQDN access examples
  • appsec/configuration.md - Filter expressions in on_match hooks

Example

on_match:
  - filter: req.Host == "staging.example.com"  # was: req.URL.Host
    apply:
      - SetRemediation("allow")
- To get the FQDN: `req.Host`  # was: req.URL.Host
Original prompt

This pull request updates the occurrences of req.Url.Host to req.Host in the crowdsecurity/crowdsec-docs repository. The changes are necessary to reflect the updated usage and ensure code consistency in accessing the HTTP request's host information. Affected files include configurations and hook documentations where the outdated req.Url.Host was used.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: LaurenceJJones <23139695+LaurenceJJones@users.noreply.github.com>
Copilot AI changed the title [WIP] Update req.Url.Host to req.Host for consistency Update req.URL.Host to req.Host in AppSec documentation Jan 7, 2026
Copilot AI requested a review from LaurenceJJones January 7, 2026 14:51
@aws-amplify-eu-west-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-974.d1to60jd2gb6y6.amplifyapp.com

@LaurenceJJones LaurenceJJones marked this pull request as ready for review January 7, 2026 15:02
@LaurenceJJones
Copy link
Member

feedback crowdsecurity/crowdsec#3837

@LaurenceJJones LaurenceJJones merged commit 410ac91 into main Jan 14, 2026
3 checks passed
@LaurenceJJones LaurenceJJones deleted the copilot/update-req-url-host-usage branch January 14, 2026 12:10
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