Class CORSConfig
- java.lang.Object
-
- io.quarkus.vertx.http.runtime.cors.CORSConfig
-
public class CORSConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description Optional<Boolean>
accessControlAllowCredentials
The `Access-Control-Allow-Credentials` header is used to tell the browsers to expose the response to front-end JavaScript code when the request’s credentials mode Request.credentials is “include”.Optional<Duration>
accessControlMaxAge
The `Access-Control-Max-Age` response header value indicating how long the results of a pre-flight request can be cached.Optional<List<String>>
exposedHeaders
HTTP headers exposed in CORS Comma separated list of valid headers.Optional<List<String>>
headers
HTTP headers allowed for CORS Comma separated list of valid headers.Optional<List<String>>
methods
HTTP methods allowed for CORS Comma separated list of valid methods.Optional<List<String>>
origins
Origins allowed for CORS Comma separated list of valid URLs.
-
Constructor Summary
Constructors Constructor Description CORSConfig()
-
-
-
Field Detail
-
origins
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<List<String>> origins
Origins allowed for CORS Comma separated list of valid URLs. ex: http://www.quarkus.io,http://localhost:3000 The filter allows any origin if this is not set. default: returns any requested origin as valid
-
methods
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<List<String>> methods
HTTP methods allowed for CORS Comma separated list of valid methods. ex: GET,PUT,POST The filter allows any method if this is not set. default: returns any requested method as valid
-
headers
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<List<String>> headers
HTTP headers allowed for CORS Comma separated list of valid headers. ex: X-Custom,Content-Disposition The filter allows any header if this is not set. default: returns any requested header as valid
-
exposedHeaders
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<List<String>> exposedHeaders
HTTP headers exposed in CORS Comma separated list of valid headers. ex: X-Custom,Content-Disposition default: empty
-
accessControlMaxAge
@ConfigItem public Optional<Duration> accessControlMaxAge
The `Access-Control-Max-Age` response header value indicating how long the results of a pre-flight request can be cached.
-
accessControlAllowCredentials
@ConfigItem public Optional<Boolean> accessControlAllowCredentials
The `Access-Control-Allow-Credentials` header is used to tell the browsers to expose the response to front-end JavaScript code when the request’s credentials mode Request.credentials is “include”. The value of this header will default to `true` if `quarkus.http.cors.origins` property is set and there is a match with the precise `Origin` header and that header is not '*'.
-
-