Sync works on the deployed site; add reproducible build and deploy script
The Pages deployment is now the primary copy, so two things had to change: - Hosted pages fall back to steam-sync.py on 127.0.0.1:8765 instead of refusing to sync. steam-sync.py now answers Chrome's Private Network Access preflight (Access-Control-Allow-Private-Network), which is what a public https page needs before it may call into localhost. - The build sources lived in /tmp and would have been lost. They now live in build/, and build.py outputs to the repo root. deploy.sh rebuilds, commits and pushes in one step. Editing index.html directly is no longer the workflow - edit build/ and run ./deploy.sh.
This commit is contained in:
parent
4d5545e6c5
commit
a63606b5c8
17 changed files with 6120 additions and 18 deletions
|
|
@ -130,6 +130,9 @@ class Handler(http.server.SimpleHTTPRequestHandler):
|
|||
self.send_header("Access-Control-Allow-Origin", "*")
|
||||
self.send_header("Access-Control-Allow-Headers", "*")
|
||||
self.send_header("Access-Control-Allow-Methods", "GET, OPTIONS")
|
||||
# Chrome asks for this when a public https page (e.g. the Pages deployment)
|
||||
# calls into 127.0.0.1. Without it the request is blocked before it is sent.
|
||||
self.send_header("Access-Control-Allow-Private-Network", "true")
|
||||
|
||||
def do_OPTIONS(self):
|
||||
self.send_response(204)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue