Skip to content

Commit

Permalink
fix(pgs): default redirect status should be 301
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Jan 10, 2025
1 parent facce22 commit 3c2cdad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pgs/redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func parseRedirectText(text string) ([]*RedirectRule, error) {
to := rest[toIndex]
lastParts := rest[toIndex+1:]
conditions := map[string]string{}
sts := http.StatusOK
sts := http.StatusMovedPermanently
frcd := false
if len(lastParts) > 0 {
sts, frcd = hasStatusCode(lastParts[0])
Expand Down
2 changes: 1 addition & 1 deletion pgs/redirect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestParseRedirectText(t *testing.T) {
{
From: "/wow",
To: "/index.html",
Status: 200,
Status: 301,
Query: empty,
Conditions: empty,
},
Expand Down

0 comments on commit 3c2cdad

Please sign in to comment.