Software /
code /
prosody-modules
Diff
mod_http_oauth2/mod_http_oauth2.lua @ 5396:ac7c5669e5f5
mod_http_oauth2: Return status 405 for GET to endpoints without GET handler
Endpoints that only do POST have the weird side effect that a GET query
to them return 404, which doesn't quite feel like the right semantics.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 30 Apr 2023 17:04:55 +0200 |
parent | 5394:434ee49b04de |
child | 5397:18b57e91b5e5 |
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua Sun Apr 30 20:34:36 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Sun Apr 30 17:04:55 2023 +0200 @@ -918,6 +918,8 @@ -- Some convenient fallback handlers ["GET /register"] = { headers = { content_type = "application/schema+json" }; body = json.encode(registration_schema) }; + ["GET /token"] = function() return 405; end; + ["GET /revoke"] = function() return 405; end; }; });