Open t2ym opened 7 years ago
nginx.conf
for HTTPS proxy to polyserve
at port 8080 # HTTPS server
#
server {
listen 443 ssl;
... SSL configurations
# Service-Worker-Allowed header
add_header Service-Worker-Allowed /;
...
# Proxy setting to polyserve at localhost:8080
location /components/ {
proxy_pass http://localhost:8080/components/;
}
}
Steps to run the demo without
Service-Worker-Allowed
header and HTTPS configuration../../thin-hook
from thesrc
ofhook.min.js
Notes:
polyserve
that serveshook.min.js
at/hook.min.js
in addition to/components/thin-hook/hook.min.js
so that Service Worker scope can be set as the root/
directory withoutService-Worker-Allowed
configuration at the web server.src="../../thin-hook/hook.min.js"
indemo/original-index.html
andgulp demo
command are required if the demo is modified.demo/no-hook-authorization.js
has to be updated as well.