mod_http_oauth2: Disable CORS for authorization endpoint
Per recommendation in draft-ietf-oauth-security-topics-23
Hopefully it is enough to return an error status, since mod_http will
add CORS headers from a handler with higher priority, even for OPTIONS.
--- a/mod_http_oauth2/mod_http_oauth2.lua Sun Jun 11 14:06:28 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua Fri Jun 16 00:05:57 2023 +0200
@@ -1121,6 +1121,7 @@
-- Step 2. User-facing login and consent view
["GET /authorize"] = handle_authorization_request;
["POST /authorize"] = handle_authorization_request;
+ ["OPTIONS /authorize"] = { status_code = 403; body = "" };
-- Step 3. User is redirected to the 'redirect_uri' along with an
-- authorization code. In the insecure 'implicit' flow, the access token