Skip to content

Conversation

therepanic
Copy link
Contributor

Closes: gh-17321

Comment on lines +45 to +50
/**
* Create a new instance of {@link FeaturePolicyHeaderWriter}
*/
public FeaturePolicyHeaderWriter() {
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PermissionsPolicyHeaderWriter has an empty constructor, while FeaturePolicyHeaderWriter does not. To create a method with a customizer, I created an empty constructor for it. Is that okay?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 7, 2025
@DeepDhamala
Copy link
Contributor

I think it's reasonable that you added the constructor. The default constructor was originally absent to ensure that FeaturePolicyHeaderWriter couldn't be instantiated without explicitly providing policyDirectives at the time of instantiation.
Now that we're requiring the Customizer to be passed via the DSL, it makes sense that policyDirectives must be set using .setPolicyDirectives(...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add lambda DSL method for featurePolicy
3 participants