You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ServiceWorker that is included in the ipwb replay system requires either HTTPS or localhost (potentially using HTTP) to function by design.
When using Proxy mode and HTTP on localhost, the ServiceWorker ceases to register or function.
For example, in my /etc/hosts file I added a line: 127.0.0.1 myipwb
...which should map all traffic for the "host" myipwb to localhost. I then run:
ipwb index ipwb/samples/warcs/5mementos.warc | ipwb replay -P myipwb
and access http://myipwb:5000 in my browser. The console reports:
"ServiceWorker registration failed: DOMException: Only secure origins are allowed (see: https://goo.gl/Y0ZkNV)."
This is expected because of the above but should be remedied or at least should provide the user with info of why their embedded mementos are not redirecting properly.
Also, with proxy mode, there may need to be port consideration when a proxied host is specified that does not contain this information. Perhaps 80/443 should be assumed or, as shown here, the default port propagated. This ticket is not about this facet.
The text was updated successfully, but these errors were encountered:
This is an expected behavior, which I won't call a bug. The requirement of HTTPS for non-localhost host names is independent of the proxy mode. This behavior can be seen with and without the proxy mode.
A warning message on the page can be added if the registration of the SW fails, but this can be caused by many reasons, hence, it should not necessarily be attributed to the proxy mode. Whatever is the reason of failure, the re-routing functionality will cease to work, so the message should be generic enough.
I would not worry about the presence or absence of the port number in the proxy URL. Directing traffic to the IPWB server instance using the supplied proxy URL is the responsibility of the person who configured and supplied the proxy URL.
The ServiceWorker that is included in the ipwb replay system requires either HTTPS or localhost (potentially using HTTP) to function by design.
When using Proxy mode and HTTP on localhost, the ServiceWorker ceases to register or function.
For example, in my /etc/hosts file I added a line:
127.0.0.1 myipwb
...which should map all traffic for the "host" myipwb to localhost. I then run:
ipwb index ipwb/samples/warcs/5mementos.warc | ipwb replay -P myipwb
and access http://myipwb:5000 in my browser. The console reports:
"ServiceWorker registration failed: DOMException: Only secure origins are allowed (see: https://goo.gl/Y0ZkNV)."
This is expected because of the above but should be remedied or at least should provide the user with info of why their embedded mementos are not redirecting properly.
Also, with proxy mode, there may need to be port consideration when a proxied host is specified that does not contain this information. Perhaps 80/443 should be assumed or, as shown here, the default port propagated. This ticket is not about this facet.
The text was updated successfully, but these errors were encountered: