Package org.springframework.security.web.header.writers

# Class CrossOriginEmbedderPolicyHeaderWriter

java.lang.Object
org.springframework.security.web.header.writers.CrossOriginEmbedderPolicyHeaderWriter

All Implemented Interfaces:
  `HeaderWriter`

public final class CrossOriginEmbedderPolicyHeaderWriter extends Object implements HeaderWriter
Inserts Cross-Origin-Embedder-Policy header.

Since:
  5.7
See Also:
  - Cross-Origin-Embedder-Policy

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`CrossOriginEmbedderPolicyHeaderWriter.CrossOriginEmbedderPolicy`

## Constructor Summary

Constructors
Constructor
Description
`CrossOriginEmbedderPolicyHeaderWriter()`

## Method Summary

Modifier and Type
Method
Description
`void`
`setPolicy(CrossOriginEmbedderPolicyHeaderWriter.CrossOriginEmbedderPolicy embedderPolicy)`
Sets the `CrossOriginEmbedderPolicyHeaderWriter.CrossOriginEmbedderPolicy` value to be used in the `Cross-Origin-Embedder-Policy` header
`void`
`writeHeaders(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)`
Create a `Header` instance.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CrossOriginEmbedderPolicyHeaderWriter

public CrossOriginEmbedderPolicyHeaderWriter()

## Method Details

### setPolicy

public void setPolicy(CrossOriginEmbedderPolicyHeaderWriter.CrossOriginEmbedderPolicy embedderPolicy)
Sets the `CrossOriginEmbedderPolicyHeaderWriter.CrossOriginEmbedderPolicy` value to be used in the `Cross-Origin-Embedder-Policy` header

Parameters:
  `embedderPolicy` - the `CrossOriginEmbedderPolicyHeaderWriter.CrossOriginEmbedderPolicy` to use

### writeHeaders

public void writeHeaders(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
Description copied from interface: `HeaderWriter`
Create a `Header` instance.

Specified by:
  `writeHeaders` in interface `HeaderWriter`
Parameters:
  `request` - the request
  `response` - the response