Reputation: 543
I am working on a application to make it PWA, the issue is it calls an API that is HTTP instead of HTTPS. (all other APIs are in HTTPS) . The problem is service worker does not get registered due to this single HTTP request due to which Add to Home screen pop up doesnot appear. So I was wondering if there is any way to bypass the HTTP request so as to register the service worker. My current flow is as follows:
Please suggest if there is any solution to this. As per the PWA checklist, we cant have a HTTP request. So basically I am looking for a cheat that can be done.
Upvotes: 0
Views: 210
Reputation: 2923
Consider calling the http service from your web server that is secure.
Your server would just act as a middleman in the transaction, forwarding the browser's request to the http service, and returning the result.
Upvotes: 1