```install(CORS) { method(HttpMethod.Options) ...
# server
t
Copy code
install(CORS) {
  method(HttpMethod.Options)
  method(HttpMethod.Get)
  method(<http://HttpMethod.Post|HttpMethod.Post>)
  method(HttpMethod.Put)
  method(HttpMethod.Delete)
  method(HttpMethod.Patch)
  header(HttpHeaders.AccessControlAllowHeaders)
  header(HttpHeaders.ContentType)
  header(HttpHeaders.Authorization)
  header(HttpHeaders.AccessControlAllowOrigin)
  allowCredentials = true
  anyHost()
}
I have setup CORS but I still get this error on firefox browser, can someone please help?
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource
Solved it, issue was with url. I was generating a wrong url and CORS error was misleading as error was purely due to wrong url.