mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Split up server creation and request handling
This allows us to decouple the WebSocket listening from the HTTP configs, making these features completely orthogonal.
This commit is contained in:
28
config/http/middleware/default.json
Normal file
28
config/http/middleware/default.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
|
||||
"import": [
|
||||
"css:config/http/middleware/handlers/constant-headers.json",
|
||||
"css:config/http/middleware/handlers/cors.json"
|
||||
],
|
||||
"@graph": [
|
||||
{
|
||||
"comment": "All of these will always be executed on any incoming request. These are mostly used for adding response headers.",
|
||||
"@id": "urn:solid-server:default:Middleware",
|
||||
"@type": "SequenceHandler",
|
||||
"handlers": [
|
||||
{
|
||||
"comment": "These handlers can be executed in any order.",
|
||||
"@id": "urn:solid-server:default:ParallelMiddleware",
|
||||
"@type": "ParallelHandler",
|
||||
"handlers": [
|
||||
{ "@id": "urn:solid-server:default:Middleware_Header" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"comment": "CORS has to be last since it can close the connection.",
|
||||
"@id": "urn:solid-server:default:Middleware_Cors"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user