Redirect with 302 by default

This commit is contained in:
Brahim Hadriche committed 2023-01-22 21:42:47 -05:00
1 parent ee29d7a4b3
commit a38c6ebf7f
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -72,7 +72,7 @@ namespace Http
m.source = Http.HttpResponseSource.GENERATED
end function
function Redirect(where as string, code = 301 as integer)
function Redirect(where as string, code = 302 as integer)
m.headers["Location"] = where
message = "Moved to: <a href=" + Quote() + where + Quote() + ">" + where + "</a>"
m.Default(code, message)
@@ -22,7 +22,7 @@ namespace Http
dashUrl = `${instance}/api/manifest/dash/id/${v}`
if metadata = invalid and local = invalid
response.Redirect(dashUrl, 302)
response.Redirect(dashUrl)
return true
end if
@@ -39,7 +39,7 @@ namespace Http
InvidiousSettings.SetAuthToken(token, referer)
server.task.top.login = true
end if
response.Redirect("/", 302)
response.Redirect("/")
return true
end function)
end function
@@ -39,7 +39,7 @@ function WebServerLoop()
homeRouter = new Http.HttpRouter()
homeRouter.Get("/", function(context as object) as boolean
response = context.response
response.Redirect("/index.v1.html", 302)
response.Redirect("/index.v1.html")
return true
end function)