Skip to content

Commit d96fe1f

Browse files
Merge pull request #1 from suciuandrei94/fix-www
Fixed www routing (e.g. if someone tried from safari) it wouldn't red…
2 parents 632043b + ddff7a1 commit d96fe1f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ const HttpsRedirect = ({ disabled, children }) => {
1717
window.location.href = window.location.href.replace(
1818
/^http(?!s)/,
1919
'https'
20-
);
20+
).replace(
21+
'www.',
22+
'';
2123
return null;
2224
}
2325

0 commit comments

Comments
 (0)