angularjshttpcdnrackspaceakamai

CDN (Akamai), origin app with RESTfull api and HTTP DELETE method "501 not supported"


AngularJS based app hosted on https://123.45.67.89 is accessed through a CDN (Akamai) network which manages the app's domain name https://www.killerapp.com. CDN network is configured to have cache TTL 1 day for everything /* except /api/* for which TTL = 0. The /api/* is the origin app's RESTful API which angularJS part calls with HTTP GET, POST and DELETE. GET and POST work fine but HTTP DELETE to www.killerapp.com/api/orders/00001 returns HTTP 501.

The question: is private CDN network supposed to block HTTP DELETE or there's a way to fix it with the CDN's setup?


Solution

  • DELETE is blocked by default in akamai configurations, if you want to pass it through you should create a rule on your property manager (i'm assuming you are using property manager) and add the "Allow DELETE" behaviour to it, you can check if it's already enabled by searching for this tag in the XML:

    <security:allow-delete>on</security:allow-delete>
    

    Piece of advice: DO NOT "allow delete" globally, create a specific rule and limit as much as possible.