However my CDN doesn’t support DELETE method, but only GET, HEAD, POST, and OPTIONS. I remember that Rails can make a POST request instead of DELETE by adding a “_method” request variable. So how can I config Discourse to do that?
BTW, my CDN is a kind of “smart” CDN that I just tell it my domain name and do some config on DNS without settings on Discourse part and it will speed my site by caching small files like images and css automatically. So in a word, all client requests, including the DELETE one, go through the CDN server first. Then the CDN server decides to return cached files directly or to go further to my original server next.
I saw that. But my CDN vendor, which is also my host vendor, doesn’t support that way. BTW, I’m from China, and my choices are limited. What’s more, that way also has an advantage that it can speed the user uploaded images like avatars.
I think it’s great to make an option in admin panel to allow POST for DELETE. This is not only for CDN but may also for servers, proxies that don’t support DELETE. And it’s especially useful for the kind of smart CDN, which can speed up all images, including user uploaded ones, but may not support DELETE method. Aliyun CDN, one of the biggest in China, is just such an example.