Skip to content

Commit

Permalink
Merge pull request #4 from arachnys/fix-ttf-bad-request
Browse files Browse the repository at this point in the history
Fix TTFs returning bad request error
  • Loading branch information
MrSaints committed Nov 2, 2017
2 parents 3e5d0c3 + 30926ab commit 24134d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkg/camo/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ import (
"github.com/cactus/mlog"
)

var acceptedContentTypes = []string{
"application/font-woff",
"application/vnd.ms-fontobject",
"application/x-font",
"image/",
"text/css",
}
var defaultAcceptHeaders = "image/*, text/*, application/*"

// Config holds configuration data used when creating a Proxy with New.
type Config struct {
// HMACKey is a byte slice to be used as the hmac key
Expand Down
11 changes: 11 additions & 0 deletions pkg/camo/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ import (
"regexp"
)

var acceptedContentTypes = []string{
"application/font-woff",
"application/vnd.ms-fontobject",
"application/x-font",
"font/",
"image/",
"text/css",
}

var defaultAcceptHeaders = "image/*, font/*, text/*, application/*"

// ValidReqHeaders are http request headers that are acceptable to pass from
// the client to the remote server. Only those present and true, are forwarded.
// Empty implies no filtering.
Expand Down

0 comments on commit 24134d8

Please sign in to comment.