Package io.muserver.handlers
Interface ResourceCustomizer
-
public interface ResourceCustomizer
A hook to change responses for static resources.This is primarily used to customize the headers of static files. Register this hook with
ResourceHandlerBuilder.withResourceCustomizer(ResourceCustomizer)
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
beforeHeadersSent(MuRequest request, Headers responseHeaders)
Called after the default headers have been set, just before they are sent to the client.
-
-
-
Method Detail
-
beforeHeadersSent
default void beforeHeadersSent(MuRequest request, Headers responseHeaders)
Called after the default headers have been set, just before they are sent to the client. Changing the passed in headers map will change the response headers sent to the client.- Parameters:
request
- The client requestresponseHeaders
- The headers that will be sent to the client, which can be modified in this method
-
-