Class DateHeader

java.lang.Object
org.restheart.handlers.injectors.DateHeader
All Implemented Interfaces:
ConfigurablePlugin, ExchangeTypeResolver<ServiceRequest<?>,ServiceResponse<?>>, Interceptor<ServiceRequest<?>,ServiceResponse<?>>, Plugin, WildcardInterceptor

public class DateHeader extends Object implements WildcardInterceptor
Sets the Date response header According to the HTTP specification, the `Date` header should be included in all responses, except when the server lacks an accurate clock. In Undertow, the `Date` header is added via ThreadLocal<SimpleDateFormat>. However, this approach is not optimal for virtual threads.
Author:
Andrea Di Cesare <andrea@softinstigate.com>