Skip to content
Snippets Groups Projects
Commit 19932df5 authored by Rohith's avatar Rohith
Browse files

Merge pull request #31 from gambol99/godeps

- updating the godeps to work for no-cache response
parents 8b868cea 362f9e3a
No related branches found
No related tags found
No related merge requests found
...@@ -39,23 +39,23 @@ ...@@ -39,23 +39,23 @@
}, },
{ {
"ImportPath": "github.com/gambol99/go-oidc/http", "ImportPath": "github.com/gambol99/go-oidc/http",
"Rev": "868d837be69522f73b789fe1db4c46f15e1fc05a" "Rev": "1065ae3e00802992e6007decd79278ad714fd94a"
}, },
{ {
"ImportPath": "github.com/gambol99/go-oidc/jose", "ImportPath": "github.com/gambol99/go-oidc/jose",
"Rev": "868d837be69522f73b789fe1db4c46f15e1fc05a" "Rev": "1065ae3e00802992e6007decd79278ad714fd94a"
}, },
{ {
"ImportPath": "github.com/gambol99/go-oidc/key", "ImportPath": "github.com/gambol99/go-oidc/key",
"Rev": "868d837be69522f73b789fe1db4c46f15e1fc05a" "Rev": "1065ae3e00802992e6007decd79278ad714fd94a"
}, },
{ {
"ImportPath": "github.com/gambol99/go-oidc/oauth2", "ImportPath": "github.com/gambol99/go-oidc/oauth2",
"Rev": "868d837be69522f73b789fe1db4c46f15e1fc05a" "Rev": "1065ae3e00802992e6007decd79278ad714fd94a"
}, },
{ {
"ImportPath": "github.com/gambol99/go-oidc/oidc", "ImportPath": "github.com/gambol99/go-oidc/oidc",
"Rev": "868d837be69522f73b789fe1db4c46f15e1fc05a" "Rev": "1065ae3e00802992e6007decd79278ad714fd94a"
}, },
{ {
"ImportPath": "github.com/gin-gonic/gin", "ImportPath": "github.com/gin-gonic/gin",
......
...@@ -118,7 +118,7 @@ func expires(date, expires string) (time.Duration, bool, error) { ...@@ -118,7 +118,7 @@ func expires(date, expires string) (time.Duration, bool, error) {
// Cacheable checks for cache-control header in the keys response and grabs the expiration // Cacheable checks for cache-control header in the keys response and grabs the expiration
func Cacheable(hdr http.Header) (time.Duration, bool, error) { func Cacheable(hdr http.Header) (time.Duration, bool, error) {
cacheHeader := hdr.Get("Cache-Control") cacheHeader := hdr.Get("Cache-Control")
if cacheHeader == "" { if cacheHeader == "" || cacheHeader == "no-cache" {
return time.Duration(2) * time.Hour, true, nil return time.Duration(2) * time.Hour, true, nil
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment