Skip to content

Commit

Permalink
Change 301 redirect to 302 redirect
Browse files Browse the repository at this point in the history
Change the 301 (permanent) redirect to 302 (temporary) redirect in
LinkController.php. This is because the 301 redirect is cached by
browsers which leads to issues when link are updated/deleted. The links
should be 302 as the long link can change and nowadays the overhead of
a 302 redirect is minimal.
  • Loading branch information
technowhizz committed Oct 9, 2023
1 parent e05c4f9 commit 7063832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/LinkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function performRedirect(Request $request, $short_url, $secret_key=false)
]);
}
else{
return redirect()->to($long_url, 301);
return redirect()->to($long_url, 302);
}
}

Expand Down

0 comments on commit 7063832

Please sign in to comment.