Skip to main content

Error HTTP 415 when cURL from GitHub to Websites Hosted in cPanel

Comments

3 comments

  • cPRex Jurassic Moderator

    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
  • TechAmigo Support

    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 Support

    0
  • dhanyg

    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.