Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: rest sdk http_listener as a network server

$
0
0
HENRYTM wrote:
Hi I also encountered this problem.
You can solve this by using nginx as proxy on linux. This can also add https feature to your server.
Here is a small version of the needed nginx config file:
server {
        listen *:80;
        server_name localhost;

                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                proxy_set_header X-NginX-Proxy true;
                proxy_pass http://localhost:12345/;
                proxy_redirect http://localhost:12345/ https://$server_name/;
}
This script redirects all traffic to 12345. Now you just have to listen to
http_listener listener(L"http://localhost:12345");
Don't forget to the "support" calls.
Cheers,
Henry
@Henry I am using Casablanca SDK in Windows. Can you tell me how can I configure this nginx in windows so that I can use http_listener as a network server in Windows environment?

Viewing all articles
Browse latest Browse all 4845


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>