Showing posts with the label CORS

CORS with Quarkus - Example

Hello everyone, today we will show you how to enable CORS support in the Quarkus application at the global level. CORS Error in Web Apps: Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources. Let's learn how to enable cors in quarkus application, Quarkus comes with a CORS filter that implements the javax.servlet.Filter interface and intercepts all incoming HTTP requests. It can be enabled in the Quarkus configuration file, quarkus.http.cors= true http://localhost quarkus.http.cors.methods= GET,PUT,POST quarkus.http.cors.headers= X-Custom Content-Disposition quarkus.http.cors.access-control-max-age= 24H quarkus.http.cors.access-control-allow-credentials= true UserResource: package; import GET ; import javax