Skip to content

tj/go-headers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Header

Header format parser to match Netlify's format.

Example

/*
  X-Frame-Options: DENY
  X-XSS-Protection: 1; mode=block

## A path:
/templates/index.html
  # Headers for that path:
  X-Frame-Options: DENY
  X-XSS-Protection: 1; mode=block

/templates/index2.html
  X-Frame-Options: SAMEORIGIN

yields

{
  "/*": {
    "X-Frame-Options": [
      "DENY"
    ],
    "X-Xss-Protection": [
      "1; mode=block"
    ]
  },
  "/templates/index.html": {
    "X-Frame-Options": [
      "DENY"
    ],
    "X-Xss-Protection": [
      "1; mode=block"
    ]
  },
  "/templates/index2.html": {
    "X-Frame-Options": [
      "SAMEORIGIN"
    ]
  }
}

GoDoc

About

Netlify's _headers file format parser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages