Skip to content

Commit

Permalink
Merge pull request #12 from she-code-africa/redirect-url
Browse files Browse the repository at this point in the history
Redirect url
  • Loading branch information
EseAlli authored Jun 21, 2024
2 parents 9cc244c + 412dac5 commit 30386fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function App() {

useEffect(() => {
// Check if the current protocol is HTTP
if (process.env.NODE_ENV === "production") {
if (process.env.REACT_APP_NODE_ENV === "production") {
if (window.location.protocol === "http:") {
// Redirect to the equivalent URL with HTTPS
window.location.href = `https://${window.location.hostname}${window.location.pathname}`;
Expand Down

0 comments on commit 30386fa

Please sign in to comment.