im kind of confused. i installed `CORS` (with GET,...
# ktor
d
im kind of confused. i installed
CORS
(with GET, POST, OPTIONS methods,
anyHost
and
exposeHeader("Access-Control-Allow-Origin")
) but i'm still receiving 403 for requests
ok i think my confusion comes from
OPTIONS
http type. i implemented a
GET
route, but javascript-
fetch
does a call with type
OPTIONS
first apparently, which fails.
o
CORS feature should properly handle pre-flight (OPTIONS) requests
d
all i'm getting is 403 unfortunately
my setup looks like this:
Copy code
app.install(CORS) {
            method(HttpMethod.Get)
            method(<http://HttpMethod.Post|HttpMethod.Post>)
            method(HttpMethod.Options)
            anyHost()
            exposeHeader("Access-Control-Allow-Origin")
        }
i'm on
0.9.1-alpha-8
o
@cy ^^
d
ok, found the mistake with some breakpoints. i had to add
header("Authorization")
to the CORS setup, now it's working 👍 thanks.
metal 1