mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Handle OPTIONS requests in OperationHandler
This commit is contained in:
@@ -21,12 +21,13 @@ interface SimpleCorsOptions {
|
||||
|
||||
/**
|
||||
* Handler that sets CORS options on the response.
|
||||
* In case of an OPTIONS request this handler will close the connection after adding its headers.
|
||||
* In case of an OPTIONS request this handler will close the connection after adding its headers
|
||||
* if `preflightContinue` is set to `false`.
|
||||
*
|
||||
* Solid, §7.1: "A data pod MUST implement the CORS protocol [FETCH] such that, to the extent possible,
|
||||
* the browser allows Solid apps to send any request and combination of request headers to the data pod,
|
||||
* and the Solid app can read any response and response headers received from the data pod."
|
||||
* Full details: https://solid.github.io/specification/protocol#cors-server
|
||||
* Solid, §8.1: "A server MUST implement the CORS protocol [FETCH] such that, to the extent possible,
|
||||
* the browser allows Solid apps to send any request and combination of request headers to the server,
|
||||
* and the Solid app can read any response and response headers received from the server."
|
||||
* Full details: https://solidproject.org/TR/2021/protocol-20211217#cors-server
|
||||
*/
|
||||
export class CorsHandler extends HttpHandler {
|
||||
private readonly corsHandler: (
|
||||
|
||||
Reference in New Issue
Block a user