Class AccessControlAllowOriginHeaderSupplier
java.lang.Object
ch.tocco.nice2.web.core.impl.servlet.AccessControlAllowOriginHeaderSupplier
- All Implemented Interfaces:
HeaderValueSupplier
@Component
public class AccessControlAllowOriginHeaderSupplier
extends Object
implements HeaderValueSupplier
If used as service AllowedRequestOrigins can be set through an application property.
example:
nice2.web.allowedRequestOrigins=http://localhost:3000,https://tocco.github.io
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
getHeaderValue
(jakarta.servlet.http.HttpServletRequest request) void
setAllowedRequestOrigins
(String allowedRequestOrigins)
-
Constructor Details
-
AccessControlAllowOriginHeaderSupplier
public AccessControlAllowOriginHeaderSupplier()
-
-
Method Details
-
getHeaderValue
- Specified by:
getHeaderValue
in interfaceHeaderValueSupplier
-
setAllowedRequestOrigins
@Value("${nice2.web.allowedRequestOrigins}") public void setAllowedRequestOrigins(String allowedRequestOrigins)
-