Former-commit-id: 18a1b65408
This commit is contained in:
Henrique Dias committed 2017-01-02 12:20:20 +00:00
1 parent df4a030843
commit abcaf3aba7
8 files changed
+129 -84

No files matched your search

+7 -2
View File
@@ -29,9 +29,14 @@ func ServeListing(w http.ResponseWriter, r *http.Request, c *config.Config, u *c
URL: r.URL,
}
cookieScope := c.BaseURL
if cookieScope == "" {
cookieScope = "/"
}
// Copy the query values into the Listing struct
var limit int
listing.Sort, listing.Order, limit, err = handleSortOrder(w, r, c.BaseURL)
listing.Sort, listing.Order, limit, err = handleSortOrder(w, r, cookieScope)
if err != nil {
return http.StatusBadRequest, err
}
@@ -72,7 +77,7 @@ func ServeListing(w http.ResponseWriter, r *http.Request, c *config.Config, u *c
http.SetCookie(w, &http.Cookie{
Name: "display",
Value: displayMode,
Path: c.BaseURL,
Path: cookieScope,
Secure: r.TLS != nil,
})