Is it possible to make calls from and reverse?

I want to make a request from my application to another application via an unsafe API (, but I get an error. Is this the target behavior?

It seems that the Service worker did not resolve a canister ID from another domain URL.
Steps to reproduce:

  • Go to https://***
  • make fetch('https://***')
  • Got error URL "https://***" did not resolve to a canister ID.

After debugging I found, that service worker unable to resolve canisterId when page hostname does not match requesting URL. Difference is between * and *

It’s blocker for me because I want to check certificated assets from raw resource before the load a resource in IFrame. And this is the last way to solve my problem after Why can’t IFrame be used with certificated URLs?

Please, help or answer

1 Like

Also, there is no way to register custom service worker on https://***, because any request to main domain is accompanied by bootstrap-page loading instead of a custom worker JS-source.

Will us be able to register out custom service workers in future?

I’m surprised: When accessing *, no service worker should be involved. The point of raw is that it hits the HTTP Gateway on the boundary node and no certificate checking happen, so no reason to have a service worker involved.

1 Like

This applies to requests from the frontend, where the service worker is already installed. For example

  • go to any canister (for example go to OpenChat
  • open the console
  • we make a request to the same canister in raw domain zone fetch('')
  • got error, Network tab is empty

Good analysis. That sounds like a bug in the service worker to me – it should let raw urls through.


Roger! :slight_smile:
Any suggestions who can help with this issue?

It should be sufficient to extend this check, to let requests to raw urls through (just like requests to unrelated domains):

1 Like

And I still could not find the sourcecode (sorry). Thank you so much for the link!
Perhaps I’ll open a pull request :slight_smile:

1 Like

@kpeacock Check plz
Pull request


Pull request was merged.
@bitdivine @kpeacock Thanks you so much! :heart:

We appreciate the initiative, and thanks for bearing with us while we’re in the middle of migrating the serviceworker to a new codebase!