Class CORSConfig
java.lang.Object
io.quarkus.vertx.http.runtime.cors.CORSConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe `Access-Control-Allow-Credentials` response header.The `Access-Control-Max-Age` response header value inDurationformat.The HTTP headers exposed in CORS responses.The HTTP headers allowed for CORS requests.The HTTP methods allowed for CORS requests.The origins allowed for CORS. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
origins
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<List<String>> originsThe origins allowed for CORS. A comma-separated list of valid URLs, such as `http://www.quarkus.io,http://localhost:3000`. URLs enclosed in forward slashes are interpreted as regular expressions. -
methods
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<List<String>> methodsThe HTTP methods allowed for CORS requests. A comma-separated list of valid HTTP methods, such as `GET,PUT,POST`. If not set, the filter allows any HTTP method by default. Default: Any HTTP request method is allowed. -
headers
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<List<String>> headersThe HTTP headers allowed for CORS requests. A comma-separated list of valid headers, such as `X-Custom,Content-Disposition`. If not set, the filter allows any header by default. Default: Any HTTP request header is allowed. -
exposedHeaders
@ConfigItem @ConvertWith(io.quarkus.runtime.configuration.TrimmedStringConverter.class) public Optional<List<String>> exposedHeadersThe HTTP headers exposed in CORS responses. A comma-separated list of headers to expose, such as `X-Custom,Content-Disposition`. Default: No headers are exposed. -
accessControlMaxAge
The `Access-Control-Max-Age` response header value inDurationformat. Informs the browser how long it can cache the results of a preflight request. -
accessControlAllowCredentials
The `Access-Control-Allow-Credentials` response header. Tells browsers if front-end JavaScript can be allowed to access credentials when the request's credentials mode, `Request.credentials`, is set to `include`. Default: `true` if the `quarkus.http.cors.origins` property is set and matches the precise `Origin` header value.
-
-
Constructor Details
-
CORSConfig
public CORSConfig()
-
-
Method Details