Class RestHelper
java.lang.Object
com.codingchili.core.configuration.RestHelper
Utility class to set CORS headers for HTTP routing.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addHeaders(io.vertx.ext.web.Router router, boolean secure)
Enables cross origin resource sharing - useful for API's.
-
Constructor Details
-
RestHelper
public RestHelper()
-
-
Method Details
-
addHeaders
public static void addHeaders(io.vertx.ext.web.Router router, boolean secure)Enables cross origin resource sharing - useful for API's. Enables security headers - useful for security resons.- Parameters:
router
- the router to set headers for all requests.secure
- indiciates if security headers should be set.
-