how come when I do a OPTIONS request to get whethe...
# ktor
h
how come when I do a OPTIONS request to get whether CORS is enabled or not in the preflight request, it responds with a 403? currently, I have
Copy code
install(CORS) {
		method(<http://HttpMethod.Post|HttpMethod.Post>)
		allowCredentials = true
		anyHost()
	}
g
add Options as a HttpMethod where you currently only have post
h
@gotoOla still gives me a 403 ­čś×
g
Copy code
install(CORS) {
                header(HttpHeaders.Authorization)
                methods.addAll(listOf(HttpMethod.Get, <http://HttpMethod.Post|HttpMethod.Post>, HttpMethod.Put, HttpMethod.Delete, HttpMethod.Options))
                host("retracted", subDomains = listOf("localhost"))
                host("rectracted", subDomains = listOf("localhost"))
                host(
                    host = "retracted",
                    subDomains = listOf("retracted"),
                    schemes = listOf("http", "https"))
                host(
                    host = "retracted",
                    subDomains = listOf("app"),
                    schemes = listOf("http", "https")
                )
                allowNonSimpleContentTypes = true
                allowCredentials = true
            }
that's our CORS-snippet, is your somewhat similar? anyHost() would replace our host rules I guess
h
I guess it's pretty much the same except for some of those allow values haven't been updated. my cors is exactly as i sent except i just added the options method.
image.png