docs: Add comments referencing the Solid spec where relevant

Also some minor changes to completely match the spec there.
This commit is contained in:
Joachim Van Herwegen
2021-01-14 10:01:56 +01:00
parent 50e3cf5036
commit ee50f40062
9 changed files with 39 additions and 5 deletions

View File

@@ -22,6 +22,11 @@ interface SimpleCorsOptions {
/**
* Handler that sets CORS options on the response.
*
* 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
*/
export class CorsHandler extends HttpHandler {
private readonly corsHandler: RequestHandler;