Amphtml: amp-install-serviceworker scope error

Created on 15 Jan 2019  路  3Comments  路  Source: ampproject/amphtml

To whom it may concern:

I use amp-install-serviceworker for a while and it works fine. But I found an error occurred.

The path of the provided scope ('/') is not under the max scope allowed ('/mei/'). Adjust the scope, move the Service Worker script, or use the Service-Worker-Allowed HTTP header to allow the scope.

Here comes some information.

it should work well in scope ./

I checked the amp-install-serviceworker code. Looks like something strange here.
https://github.com/ampproject/amphtml/blob/master/extensions/amp-install-serviceworker/0.1/amp-install-serviceworker.js#L310

I wonder is this an issue or should I need to do anything ?

Paul

Bug

Most helpful comment

Right, I see the big in defaulting it to /.
While we fix this, you can add data-scope="/me" to amp-install-serviceworker for now.

All 3 comments

Triaging to @prateekbh , Feel free to re assign 馃槃

Right, I see the big in defaulting it to /.
While we fix this, you can add data-scope="/me" to amp-install-serviceworker for now.

Thanks you.

Was this page helpful?
0 / 5 - 0 ratings