How to allow CloudFlare stream videos on localhost - cloudflare

I am unable to view a video served on localhost:8000 (or 127.0.0.1:8000). I tried the following allowedOrigins: localhost, 127.0.0.1, localhost:8000 and 127.0.0.1:8000.
I get the This video has not been configured to be allowed on this domain error.

Add the port like localhost:666
https://community.cloudflare.com/t/cannot-see-videos-in-localhost/283779/2

Related

How to use SSL-certificates to call https://localhost with apache2 on Raspberry Pi

So I am currently working on a project where I use the Instagram API to get some user Data onto my Localhost webpage on the Raspberry. The API however needs secure redirect uri (https). But when the API wants do redirect to https://localhost/instagram it says
"404 Not Found The requested URL /instagram was not found on this server. Apache/2.4.25 (Raspbian) Server at localhost Port 443"
In the url-bar it says "Not secure", the https part is marked red and is crossed out. When I test my stuff on another computer which has Xampp and Apache running everything works fine and even if I type https://localhost it redirects straight to localhost.
I found out that I might need a SSL certificate in order to make use of https links even if I'm running on localhost. But I don't really know how I should do this on my raspberryPi. There are already some SSL modules enabled inside the Apache2 folder.

apache not serving index.html unless specified

Im new to setting up apache - the site works fine on localhost but when I access it from the LAN it does now display the index.html file - instead the browser says:
This site can’t be reached
localhost refused to connect.
Ive tried editing the apache2.conf file but nothing seems to work
I think you made another mistake. When you are on a different Computer on you network, the Apache server is not available on http://localhost/ but on the domain name or IP of the Apache Server.
The browser tries to open a connection to your client computer. But its not on localhost.

Setting up Apache2 ubuntu non-ssl Server to handle incoming wss://

I am running a video chat program on my SSL site, but need to use a non-SSL server for the chat media server. Here is my setup:
Chat server is running on non-SSL Apache2 ubuntu Amazon instance on port 8080 (checked port is open and running)
Chat is sitting on ssl server using wss://[myserver]/wss/
I've enabled proxy_wstunnel on the server
I’ve added the ProxyPass to the apache2 virtual host
SSLProxyEngine On
ProxyPass /wss/ ws://[myserver]:8080
The chat is running on the server end just fine (aside from video and audio because it’s non-ssl)
It’s not working properly while sitting on the SSL server. I’m getting this error on the screen: “Websocket closed, please try reloading page later.” and this is the error in the console: “WebSocket connection to ‘wss://[myserver]/wss/?room=3’ failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR”
Any suggestions would be greatly appreciated! Thanks!
Update: After enabling ALL proxy modules, I was able to get this to work. This was the reference that saved me days of headache: https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension

xampp Apache enable proxy for interent operations

I have followd this answer https://serverfault.com/a/249582 to enable proxy and put a line to forward internet operations. However, since I use http://localhost to browse my website, it also redirected localhost to the proxy server and thus my website cannot even load.
How can I bypass local addresses such as localhost, 127.0.0.1 or internal network IP such as 192.168.1.50, such that fopensock can work normally?

ngrok https/tls tunnel not working?

I have a private web site like internal.mycompany.com which is only accessible within company's private network. I am trying to make this web site publicly accessible using ngrok. (I purchased a business plan). No matter what I tried I was not able to open the web site using https. http works fine but it is not ideal because web site normally redirects http requests to https. Then I tried similar thing using google.
Below is what my .ngrok2/ngrok.yml file looks like:
http-google-com:
addr: www.google.com:80
host_header: "rewrite"
subdomain: "http-google-com"
proto: http
https-google-com:
addr: www.google.com:443
host_header: "rewrite"
subdomain: "https-google-com"
proto: http
tls-google-com:
addr: www.google.com:443
host_header: "rewrite"
subdomain: "tls-google-com"
proto: tls
Then I run ngrok start --all and these are the results for each case when I browse the urls with my browser. All results are same for my internal web site.
http-google-com: When I browse http://http-google-com.ngrok.io/ (or https://) browser opens https://www.google.com. Seems like it some how redirects.
https-google-com: When I browse http://https-google-com.ngrok.io/ (or https://) I get "502 Bad Gateway" error
tls-google-com: When I browse https://tls-google-com.ngrok.io/ browser says that the ssl certificate is for "google.com" domains not for "ngrok.io". After adding security exception, browser displays google's classic 404 page which says "404. That’s an error. The requested URL / was not found on this server. That’s all we know."
UPDATE
I tried proto:tcp but it did not work also.
tcp-google-com:
addr: www.google.com:443
host_header: "rewrite"
subdomain: "tcp-google-com"
proto: tcp