Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio caching (ServiceWorker) #107

Open
markspolakovs opened this issue May 10, 2020 · 2 comments
Open

Audio caching (ServiceWorker) #107

markspolakovs opened this issue May 10, 2020 · 2 comments
Assignees

Comments

@markspolakovs
Copy link
Member

WebStudio is currently hosted at /webstudio//webstudio-dev. This poses an issue when we want to intercept NIPSWeb requests, which are to /myradio/NIPSWeb/{secure,managed}_play. To get this to work we have to scope the service worker to / (done in 47b3c7e), which works, but has two problems:

  1. we need to send a Service-Worker-Allow: / header, to even let this work
  2. The service worker controls all requests on ury.org.uk, which means that if we screw up the config we can break the entire site (I did do this once, by accidentally turning all of ury.org.uk into /webstudio dev - fixed in b11de69 but the point remains)

Consider possible solutions:

  • Move all of WebStudio to a subdomain - no
  • Make a copy of the MyRadio API on a subdomain - no, because NIPSWeb isn't actually the API (hrrng)
  • Proxy something like /webstudio/secure_play -> /myradio/NIPSWeb/secure_play - could work
@mstratford
Copy link
Member

This is still borked, it currently overrides the webstudio stateserver API urls, and often with an older cached version too. Given the RAM issues we were having, I don't think doing this is suitable anywho.

@markspolakovs
Copy link
Member Author

urg - I suspect some tweaking to the regex in b11de69 may be needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants