{"id":21473514,"url":"https://github.com/reallyreally/gsuite-secure-redirector","last_synced_at":"2026-02-02T21:08:57.578Z","repository":{"id":37734058,"uuid":"101519149","full_name":"reallyreally/gsuite-secure-redirector","owner":"reallyreally","description":"Redirects Domains to Google GSuite Services In A Secure Manner (with HSTS etc)","archived":false,"fork":false,"pushed_at":"2025-07-24T09:49:17.000Z","size":736,"stargazers_count":2,"open_issues_count":29,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-24T13:34:53.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reallyreally.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-08-26T23:37:39.000Z","updated_at":"2018-03-13T21:20:44.000Z","dependencies_parsed_at":"2024-09-13T16:15:59.913Z","dependency_job_id":"ed0763ae-99bf-4858-be63-dfcbc799094d","html_url":"https://github.com/reallyreally/gsuite-secure-redirector","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/reallyreally/gsuite-secure-redirector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reallyreally%2Fgsuite-secure-redirector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reallyreally%2Fgsuite-secure-redirector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reallyreally%2Fgsuite-secure-redirector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reallyreally%2Fgsuite-secure-redirector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reallyreally","download_url":"https://codeload.github.com/reallyreally/gsuite-secure-redirector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reallyreally%2Fgsuite-secure-redirector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29019694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T18:51:31.335Z","status":"ssl_error","status_checked_at":"2026-02-02T18:49:20.777Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T10:17:35.423Z","updated_at":"2026-02-02T21:08:57.561Z","avatar_url":"https://github.com/reallyreally.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Custom URL Redirector for G Suite\n\nG Suite doesn't support Custom URL's that require SSL. HSTS domains will not work as Custom URL's and so this is your solution until Google pulls their finger out.\n\n## Getting Started\n\nIt is beyond the scope of this script to pull all the parts you need in place together to make this work. It's designed to operate on Google App Engine.\n\n### Prerequisites\n\n**If using App Engine**: A Billing Enabled App Engine Project, Understanding of Domain Aliasing in App Engine, Understanding of SSL in App Engine, gcloud SDK tools installed locally\n\n**If using Docker**: It's easy to run this inside docker (using [PM2](https://keymetrics.io/pm2/)) - you will need [Nginx](https://nginx.org/en/) (or something else) to handle connectivity.\n\nYou **must not** have the subdomains you wish to use [configured in G Suite](https://admin.google.com/AdminHome?fral=1#CompanyProfile:flyout=customUrl) or they will catch fire.\n\n### Installing (App Engine)\n\nOnce you have the code locally - you don't need to npm install anything - Google does that inside App Engine. If you are using HSTS - you will need to set the appropriate flag in the app.js file.\n\nGet the project\n\n```\ngit clone https://github.com/reallyreally/gsuite-secure-redirector.git\n```\n\nDeploy it to Google Cloud App Engine\n\n```\nnpm run deploy\n```\n\nThen connect the relevant [custom domains](https://console.cloud.google.com/appengine/settings/domains) - we suggest\n\n```\nmail.example.com\ncalendar.example.com\ndrive.example.com\nsites.example.com\ngroups.example.com\n```\n\nThen configure your wildcard (or five unique certificates) [custom ssl](https://console.cloud.google.com/appengine/settings/certificates)\n\nIf you don't want to use the above - the redirector also supports\n```\nwebmail.example.com\nemail.example.com\ncal.example.com\ncalender.example.com\nschedule.example.com\nwebcal.example.com\ndocs.example.com\nfiles.example.com\n```\n\n### Installing (Docker)\n\nThis will not work stand-alone with Docker, you will need an nginx front end the handle the SSL connection.\n\n**Starting the Container**\n```\ndocker run -d -p 8080:8080 -e REPO=\"https://github.com/reallyreally/gsuite-secure-redirector.git\" -e TRUST_PROXY=\"1\" -e PORT=8080 --name gsuite-redirector really/node-pm2-git ./pm2.json\n```\n\n**Nginx**\nExample config `/etc/nginx/conf.d/gsuite_redirector.conf`\n```\nserver {\n# The IP that you forwarded in your router (nginx proxy)\n  listen       80;\n  listen       [::]:80;\n\n# Define the services to answer - you still need to configure DNS to point here\n server_name calendar.example.com;\n server_name cal.example.com;\n server_name drive.example.com;\n server_name groups.example.com;\n server_name mail.example.com;\n server_name sites.example.com;\n\n\n# The internal IP of the VM that hosts your Apache config\n resolver 8.8.8.8 8.8.4.4 valid=300s;\n resolver_timeout 5s;\n set $upstream \"http://localhost:8080\";\n\n location / {\n\n proxy_pass_header Authorization;\n proxy_pass $upstream;\n proxy_set_header Host $host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n proxy_http_version 1.1;\n proxy_set_header Connection \"\";\n proxy_buffering off;\n client_max_body_size 0;\n proxy_read_timeout 36000s;\n proxy_redirect off;\n\n }\n\n    listen [::]:443;\n    listen 443 ssl; # managed by Certbot\nssl_certificate /etc/letsencrypt/live/gsuite.example.com/fullchain.pem; # managed by Certbot\nssl_certificate_key /etc/letsencrypt/live/gsuite.example.com/privkey.pem; # managed by Certbot\n    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot\n\n    if ($scheme != \"https\") {\n        return 301 https://$host$request_uri;\n    } # managed by Certbot\n\n}\n```\n\n## HSTS\n\nDO NOT set the [HSTS](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) flag unless you know the implications. It can break your entire domain (and every subdomain) for web traffic with modern browsers.\n\nTo enable HSTS you need to enable the environment variable. If using App Engine (`app.yaml`):\n```\nenv_variables:\n  TRUST_PROXY: '1'\n  USE_HSTS: '1'\n```\n\nIf using Docker add the environment variable at run time `-e USE_HSTS=1`\n\n## Authors\n\n* **Troy Kelly** - *Initial work* - [Really Really, Inc.](https://really.ai)\n\nSee also the list of [contributors](https://github.com/reallyreally/gsuite-secure-redirector/graphs/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the Apache License - see the [LICENSE](LICENSE) file for details\n\n## Acknowledgments\n\n* Hat tip to Google for not taking SSL seriously (but pretending they do)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freallyreally%2Fgsuite-secure-redirector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freallyreally%2Fgsuite-secure-redirector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freallyreally%2Fgsuite-secure-redirector/lists"}