Package org.codelibs.fess.cors
Class CorsHandler
java.lang.Object
org.codelibs.fess.cors.CorsHandler
- Direct Known Subclasses:
DefaultCorsHandler
Abstract base class for handling CORS (Cross-Origin Resource Sharing) requests.
Provides common CORS header constants and defines the processing interface.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringCORS header for allowing credentials.protected static final StringCORS header for specifying allowed headers.protected static final StringCORS header for specifying allowed HTTP methods.protected static final StringCORS header for specifying allowed origin.protected static final StringCORS header for allowing private network access.protected static final StringCORS header for specifying cache duration for preflight requests. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ACCESS_CONTROL_ALLOW_ORIGIN
CORS header for specifying allowed origin.- See Also:
-
ACCESS_CONTROL_ALLOW_HEADERS
CORS header for specifying allowed headers.- See Also:
-
ACCESS_CONTROL_ALLOW_METHODS
CORS header for specifying allowed HTTP methods.- See Also:
-
ACCESS_CONTROL_ALLOW_PRIVATE_NETWORK
CORS header for allowing private network access.- See Also:
-
ACCESS_CONTROL_ALLOW_CREDENTIALS
CORS header for allowing credentials.- See Also:
-
ACCESS_CONTROL_MAX_AGE
CORS header for specifying cache duration for preflight requests.- See Also:
-
-
Constructor Details
-
CorsHandler
public CorsHandler()Creates a new instance of CorsHandler.
-
-
Method Details
-
process
public abstract void process(String origin, jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response) Processes the CORS request by setting appropriate headers.- Parameters:
origin- the origin of the requestrequest- the servlet requestresponse- the servlet response
-