| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Server.Pipeline.Packument.Response
Description
Closed metadata responses shared by native registry routes.
Synopsis
- type MetadataResponse refusal = ResponseChoice (ResponseValue LByteString) (ResponseChoice (ResponseValue ()) (ResponseChoice (ResponseValue refusal) (ResponseChoice (ResponseValue refusal) (ResponseChoice (ResponseValue refusal) (ResponseChoice (ResponseValue refusal) (ResponseChoice (ResponseValue refusal) (ResponseChoice (ResponseValue refusal) (ResponseValue refusal))))))))
- metadataReplies :: ([ServeDecision] -> Text) -> (Refusal -> refusal) -> PackumentReplies (MetadataResponse refusal)
- keepPrivateUnauthorised :: PackumentReplies response -> Int -> ResponseHeaders -> Refusal -> response
Documentation
type MetadataResponse refusal = ResponseChoice (ResponseValue LByteString) (ResponseChoice (ResponseValue ()) (ResponseChoice (ResponseValue refusal) (ResponseChoice (ResponseValue refusal) (ResponseChoice (ResponseValue refusal) (ResponseChoice (ResponseValue refusal) (ResponseChoice (ResponseValue refusal) (ResponseChoice (ResponseValue refusal) (ResponseValue refusal)))))))) Source #
Metadata replies ordered as 200, 304, 401, 403, 404, 406, 500, 502 and 503.
metadataReplies :: ([ServeDecision] -> Text) -> (Refusal -> refusal) -> PackumentReplies (MetadataResponse refusal) Source #
Keep native denial wording and refusal bodies within the shared response order. A listing that admitted nothing answers 404.
keepPrivateUnauthorised :: PackumentReplies response -> Int -> ResponseHeaders -> Refusal -> response Source #
Answer a private origin's 401 with replies' 401 and every other private refusal with its 403.