Skip to content

Commit

Permalink
Fixed redirect to https
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorthiz committed Oct 16, 2024
1 parent 9d689ab commit 2f71b95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@parcel/transformer-vue": "^2.12.0",
"@types/dateformat": "^5.0.2",
"@types/js-yaml": "^4.0.9",
"@types/node": "^22.7.5",
"assert": "^2.1.0",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
Expand Down
6 changes: 6 additions & 0 deletions src/Utils/RedirectToHttps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const redirectToHttps = () => {
const host = process.env.HOST;
if (window.location.href.match(`http://${host}`)) {
window.location.protocol = "https:";
}
};

0 comments on commit 2f71b95

Please sign in to comment.