0

I'm trying to send a POST using curl to a NGINX proxy server which is then going to redirect it to the correct server.

Im currently getting several errors:

curl: (3) URL using bad/illegal format or missing URL curl: (6) Could not resolve host: POST curl: (60) SSL certificate problem: self signed certificate More details here:

curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.

I'm also getting a 405 which is why im doing to do a work around in the location block

The command I'm trying to run:

curl -H -k "Content-Type:application/json" -X -L POST -d '{"parameters":{"things":"things","stuff":"stuff"}}' https://proxy_ip/checkin

Heres my nginx config:

server {
        listen 443 http2 ssl;
        listen [::]:443 http2 ssl;
        server_name proxy;
        some ssl cert stuff...

         location /checkin {

            error_page 405 =200 $uri;
            proxy_pass http://ip of server:portnumber;
            default_type application/json;
            proxy_set_header          Host            $host;
            proxy_set_header          X-Real-IP       $remote_addr;
            allow all;

       }
}

0 Answers0