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
In some cases like this one a true http://localhost:xxx URL is needed, in this example in order to make YouTube IFRAME embed to work properly (in this example it's file: protocol, but it will break the same way with app: protocol.
I wrote a small hack to do so (for demo purposes, simplified):
The text was updated successfully, but these errors were encountered:
kirill-konshin
changed the title
Add an option to intercept localhost instead of protocol
Add an option to intercept localhost instead of custom protocol
May 16, 2024
In some cases like this one a true
http://localhost:xxx
URL is needed, in this example in order to make YouTube IFRAME embed to work properly (in this example it'sfile:
protocol, but it will break the same way withapp:
protocol.I wrote a small hack to do so (for demo purposes, simplified):
I wonder if it's possible to include something like this into the lib, I can send a pull request if it is OK.
P.S. The only drawback of this sample is necessity to
fetch
all external URLs, but so far it worked pretty OK for YouTube embed in my case.There's also a way to redirect all requests to
http://localhost
intoapp://-
but I haven't tried it yet: https://www.electronjs.org/docs/latest/api/web-request#webrequestonbeforerequestfilter-listenerThe text was updated successfully, but these errors were encountered: