diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 51c29fd..3027141 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -5,6 +5,10 @@ on: branches: - main # Trigger deployment on pushes to the main branch +permissions: + contents: read # Allow reading the content of the repository + id-token: write # Allow writing the ID token required for deployment + jobs: deploy-frontend: runs-on: ubuntu-latest diff --git a/Frontend/js/index.js b/Frontend/js/index.js index b0bda4b..59f3135 100644 --- a/Frontend/js/index.js +++ b/Frontend/js/index.js @@ -22,9 +22,10 @@ function resetCheck () { document.getElementById("check-label").classList.remove("err-message") document.getElementById("terms").classList.remove("terms-err") } -if (window.location.hostname !== "instagramtoolfront.duckdns.org") { +if (window.location.hostname !== "instagramtoolfront.duckdns.org" || window.location.hostname !== "localhost") { + // Redirect to HTTPS and the desired subdomain window.location.href = "https://instagramtoolfront.duckdns.org" + window.location.pathname; - } +} window.onload = async function() { const res = await fetch(baseUrl + '/protected', { method: 'GET',