mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
fix(server): declare Allow: GET on the new 405 responses
RFC 9110 section 15.5.6 requires a 405 to name the methods it accepts, and /api/radio/stations already does this in-tree. Thanks to kvnloo for catching it on review. The same gap on the pre-existing handlers is tracked in #809 and is deliberately left alone here.
This commit is contained in:
1 parent
fb6b4e34f0
commit
2e5dfce1af
6 files changed
+15
-4
No files matched your search
@@ -498,6 +498,8 @@ test('the routing proxy declines a non-GET before rate limiting or upstream', as
|
||||
method,
|
||||
);
|
||||
assert.equal(response.statusCode, 405, method);
|
||||
// RFC 9110 section 15.5.6 requires a 405 to name the methods it accepts.
|
||||
assert.equal(response.headers.allow, 'GET', method);
|
||||
assert.deepEqual(response.body, { error: 'Method Not Allowed' });
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user