Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a small problem with my ISP in that it blocks access to oEmbed providers presumably to prevent account spamming with high bandwidth media.
They do provide the ability to proxy oEmbed addresses with a http proxy server address.
I have no experience of how to implement a proxy in .net core or how to make a custom oEmbed provider work with a proxy.
The code they've offered is not overly helpful, it's old .net c# but I believe this API has been translated directly over to .net core....
try { WebRequest wrq = WebRequest.Create("http://domain.tld"); // replace domain.tld as wanted wrq.Proxy = new WebProxy("http://theproxyaddress"); WebResponse wrp = wrq.GetResponse();
StreamReader sr = new StreamReader(wrp.GetResponseStream(), Encoding.ASCII); while (sr.Peek() > 0) { Response.Write(sr.ReadLine()); } } catch(WebException ex) { Response.Write(ex.Message); }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
oEmbed providers blocked by ISP
I have a small problem with my ISP in that it blocks access to oEmbed providers presumably to prevent account spamming with high bandwidth media.
They do provide the ability to proxy oEmbed addresses with a http proxy server address.
I have no experience of how to implement a proxy in .net core or how to make a custom oEmbed provider work with a proxy.
The code they've offered is not overly helpful, it's old .net c# but I believe this API has been translated directly over to .net core....
try { WebRequest wrq = WebRequest.Create("http://domain.tld"); // replace domain.tld as wanted wrq.Proxy = new WebProxy("http://theproxyaddress"); WebResponse wrp = wrq.GetResponse();
StreamReader sr = new StreamReader(wrp.GetResponseStream(), Encoding.ASCII); while (sr.Peek() > 0) { Response.Write(sr.ReadLine()); } } catch(WebException ex) { Response.Write(ex.Message); }
is working on a reply...