Skip to content

feat(referer-restriction): Add configuration to block requests with m… - #13126

Open
hachi029 wants to merge 5 commits into
apache:masterfrom
hachi029:block-invalid-referer
Open

feat(referer-restriction): Add configuration to block requests with m…#13126
hachi029 wants to merge 5 commits into
apache:masterfrom
hachi029:block-invalid-referer

Conversation

@hachi029

@hachi029 hachi029 commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

…alformed Referer headers

Description

Add configuration to block requests with malformed Referer headers

Which issue(s) this PR fixes:

Fixes #13110

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Mar 29, 2026

@Baoyuantop Baoyuantop left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is recommended to add a test case that covers the combination of bypass_malformed: false + bypass_missing: false + malformed Referer to ensure that the interaction behavior of the two configuration items is tested and guaranteed.

Comment thread docs/en/latest/plugins/referer-restriction.md Outdated
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 30, 2026
@hachi029

Copy link
Copy Markdown
Contributor Author

It is recommended to add a test case that covers the combination of bypass_malformed: false + bypass_missing: false + malformed Referer to ensure that the interaction behavior of the two configuration items is tested and guaranteed.

Updated the test cases as per your advice.

@hachi029
hachi029 requested a review from Baoyuantop March 30, 2026 11:04
@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label May 30, 2026
@Baoyuantop

Copy link
Copy Markdown
Contributor

Hi @hachi029, could you please merge the latest main branch?

@hachi029

hachi029 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Hi @hachi029, could you please merge the latest main branch?

@Baoyuantop I have merged the latest main branch into this PR.

@github-actions github-actions Bot removed the stale label Jun 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Aug 3, 2026
@hachi029

hachi029 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Hi @hachi029, could you please merge the latest main branch?

@Baoyuantop I have merged the latest main branch into this PR.

@Baoyuantop I have merged the latest main branch, Could you take another look?

@github-actions github-actions Bot removed the stale label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add parameter block-when-referrer-not-parsable to plugin referer-restriction

2 participants