Software /
code /
prosody-modules
Changeset
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 |
parents | 5395:82207f936f1f |
children | 5397:18b57e91b5e5 |
files | mod_http_oauth2/mod_http_oauth2.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
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; }; });