use 308 as new skyd redirect code

This commit is contained in:
Karol Wypchlo 2021-09-07 12:56:25 +02:00
parent a0e9b13091
commit 3946ad4a77
No known key found for this signature in database
GPG Key ID: C92C016317A964D0
2 changed files with 2 additions and 2 deletions

View File

@ -2,6 +2,6 @@ set $nocache 0; # internal variable for bypassing the cache, nginx expects 0/1 f
proxy_cache skynet; # cache name proxy_cache skynet; # cache name
proxy_cache_key $skylink_v1$path$arg_format$arg_attachment$arg_start$arg_end$http_range; # unique cache key proxy_cache_key $skylink_v1$path$arg_format$arg_attachment$arg_start$arg_end$http_range; # unique cache key
proxy_cache_min_uses 3; # cache after 3 uses proxy_cache_min_uses 3; # cache after 3 uses
proxy_cache_valid 200 206 307 48h; # keep 200, 206 and 307 responses valid for up to 2 days proxy_cache_valid 200 206 307 308 48h; # keep 200, 206, 307 and 308 responses valid for up to 2 days
proxy_cache_bypass $nocache $cookie_nocache $arg_nocache; # add cache bypass option proxy_cache_bypass $nocache $cookie_nocache $arg_nocache; # add cache bypass option
add_header X-Proxy-Cache $upstream_cache_status; # add response header to indicate cache hits and misses add_header X-Proxy-Cache $upstream_cache_status; # add response header to indicate cache hits and misses

View File

@ -1027,7 +1027,7 @@ function hnsEndpointDirectoryRedirect(done) {
const expected = { const expected = {
name: "hns endpoint directory redirect", name: "hns endpoint directory redirect",
skylink: "hns/note-to-self", skylink: "hns/note-to-self",
statusCode: 307, statusCode: 308,
headers: { headers: {
location: "note-to-self/", location: "note-to-self/",
}, },