-
Notifications
You must be signed in to change notification settings - Fork 394
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
WIP: [LocalProxy - CORS] Proxy requests using the local server #376
base: master
Are you sure you want to change the base?
Conversation
Just found few issues, will open again when fixed :) |
Trying to fix the range issue, it seems if you skip the stream ahead, it will create a loop :P |
PR ionic-team#376 from @edunand
Great job @edunad ! I am trying to integrate your PR in my version for Android. Did you try using the proxy for POST requests? I did not find out how to get this working, yet. |
@NiklasMerz Thanks! Sadly my java android knowledge is kinda limited, i expected the ionic team to give a hand into solving the issues i've encountered (specifically with PARTIAL CONTENT). I haven't tried POST but i suspect it would work fine, since it's just appending the CORS into the response headers |
The problem with POST is that it does not pass the body through the proxy. I need a way to do that. The |
I can confirm that range requests are not supported correctly + the curent implementation breaks video playback, please either drop support, and support it correctly. |
Android only, improvements are welcome!
So far I've seen the ability to proxy requests using a known ip, this was not suitable for me.
Now you can perform
http://localhost/_local_proxy_/<link_here>
and it will proxy the request to<link_here>
, as well as injecting some CORS headers.Ideally you would want :
localproxy://
instead, but had problems implementing a custom schemaExample :
Result:
Sorry if this is already possible, could not find it :(
Related to: #230 (iOS only), #227 and #47