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

Add a ReferrerPolicy middleware #244

Closed
ellmetha opened this issue Jul 12, 2024 · 0 comments
Closed

Add a ReferrerPolicy middleware #244

ellmetha opened this issue Jul 12, 2024 · 0 comments
Assignees
Milestone

Comments

@ellmetha
Copy link
Member

Description

Context

Right now, Marten does not set the Referrer-Policy as part of HTTP responses. Let's introduce a new Marten::Middleware::ReferrerPolicy middleware to automatically set this header (based on an associated setting value) if it is not already set.

Implementation

The new Marten::Middleware::ReferrerPolicy middleware should only set the Referrer-Policy header if it is not already defined (eg. by the handler that produced the response). The value of the Referrer-Policy header should be determined based on the value of a new referrer_policy top-level setting which should contain the intended referrer policy directive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants