diff --git a/package.json b/package.json index 6afb82b..fd03e61 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/Utils/RedirectToHttps.ts b/src/Utils/RedirectToHttps.ts new file mode 100644 index 0000000..52d9ca5 --- /dev/null +++ b/src/Utils/RedirectToHttps.ts @@ -0,0 +1,6 @@ +export const redirectToHttps = () => { + const host = process.env.HOST; + if (window.location.href.match(`http://${host}`)) { + window.location.protocol = "https:"; + } +}; \ No newline at end of file