-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Domain overrides settings #35 #106
Conversation
This pull request introduces 1 alert when merging 2bbb7e5 into 5ec0065 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging e1fa2bd into 5ec0065 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 7b7e3ae into 5ec0065 - view on LGTM.com new alerts:
|
|
@@ -135,7 +136,9 @@ func (c Object) handleMetadata(domainID string, targetURL url.URL, expiration ti | |||
// StoreFullPage - Stores the whole page response in cache. | |||
func (c Object) StoreFullPage(expiration time.Duration) (bool, error) { | |||
if !c.IsStatusAllowed() || !c.IsMethodAllowed() || expiration < 1 { | |||
log.Debugf( | |||
log.WithFields(log.Fields{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inject the logger?
server/server.go
Outdated
// timeout middleware | ||
// NOTE: THIS IS FOR EVERY DOMAIN, NO DOMAIN OVERRIDE. | ||
// WHEN SHARING SAME PORT NO CUSTOM OVERRIDES ON CRITICAL SETTINGS. | ||
timeout := config.Config.Server.Timeout | ||
// TODO! CONVERT FOR DOMAIN CONFIG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix todo
) | ||
|
||
// LoggedResponseWriter - Decorator for http.ResponseWriter. | ||
func (lwr LoggedResponseWriter) GetLogger() *log.Entry { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to inject
|
||
// GetLogger - Get logger instance with RequestID. | ||
func (rc RequestCall) GetLogger() *log.Entry { | ||
return log.WithFields(log.Fields{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inject the logger?
func initRequestParams(res http.ResponseWriter, req *http.Request) (RequestCall, error) { | ||
var configFound bool | ||
|
||
reqID := xid.New().String() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract and test
This pull request introduces 1 alert when merging b63caa2 into 5ec0065 - view on LGTM.com new alerts:
|
server/handler/gzip.go
Outdated
// HandleRequestWithETag - Add HTTP header ETag only on HTTP(S) requests. | ||
func WrapResponseForGZip(res *response.LoggedResponseWriter, req *http.Request) { | ||
if !strings.Contains(req.Header.Get(headers.AcceptEncoding), "gzip") { | ||
return // TODO! COVER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cover
server/handler/http.go
Outdated
proxy.ServeHTTP(rc.Response, rc.Request) | ||
serveNotModified := rc.GetResponseWithETag(proxy) | ||
if serveNotModified { | ||
rc.Response.SendNotModifiedResponse() // TODO! COVER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cover
This pull request introduces 1 alert when merging 55b599a into 5ec0065 - view on LGTM.com new alerts:
|
55b599a
to
6ea2010
Compare
This pull request introduces 1 alert when merging 5e54cb8 into 5ec0065 - view on LGTM.com new alerts:
|
Domain overrides settings #35