Error HTTP 415 when cURL from GitHub to Websites Hosted in cPanel
Hi, I encountered a 415 issue when using curl to access a website hosted in cPanel from GitHub. The error message: 415 Unsupported Media Type openresty/1.27.1.1
There are Imunify360 and CSF in the server, but I think CSF and Imunify360 cannot handle whitelisting thousands of GitHub's IPs. Any other idea?
-
Hey there! I'll post the reply from the other thread here as well.
Since this is from a separate area coming into cPanel you may want to check more generic details such as this information about the media type setting:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/415
but disabling the firewall temporarily would also be a valid test to see if that is related.
0 -
Hello Dhanyg,
It seems the 415 "Unsupported Media Type" error is likely not a firewall/blocking issue, but rather a request format or media type problem that the web server/proxy doesn't accept.
We'll suggests few steps to ensure it's type.
- First check it's Content-Type Header and ensure that you're sending the correct Content-Type
curl -H "Content-Type: application/json" -X POST https://yoursite.com/endpoint
- Also, check for missing required headers. Some APIs require specific header like Accept, User-Agent, etc.
- In-addition, if it's actually a blocking issue through Imunify360,
It might be blocking based on request patterns. However, temporarily disable Imunify360's WAF rule and confirm it.
Thank you
Regards,
TechAmigo Support0 -
Hi, thanks for the advice. I already gave a suggestion about additional header within the request, but still didn't work. Let me try temporarily disabling Imunify360.
0
Please sign in to leave a comment.
Comments
3 comments