yesod-csp-0.2.4.0: Add CSP headers to Yesod apps

Safe HaskellNone
LanguageHaskell2010

Yesod.Csp.Example

Description

Assorted examples demonstrating different policies.

Synopsis

Documentation

data Example #

Constructors

Example 

Instances

RouteAttrs Example # 
ParseRoute Example # 

Methods

parseRoute :: ([Text], [(Text, Text)]) -> Maybe (Route Example) #

RenderRoute Example # 

Associated Types

data Route Example :: * #

Methods

renderRoute :: Route Example -> ([Text], [(Text, Text)]) #

Yesod Example # 
YesodDispatch Example # 
Eq (Route Example) # 
Read (Route Example) # 
Show (Route Example) # 
data Route Example # 

getExample1R :: Handler Html #

Allows scripts from self.

getExample2R :: Handler Html #

Allows all styles over https.

getExample3R :: Handler Html #

Allows images from a certain uri.

getExample4R :: Handler Html #

Allows all images.

getExample5R :: Handler Html #

Disallows images entirely.

getExample6R :: Handler Html #

Blocks forms from being submitted

runExamples :: IO () #

Run a webserver to serve these examples at 1, 2, etc.