I need to add PURGE methood in phoenix routes. We use cache in nginx and to delete cache we use PURGE method which I can’t implement
In my opinion you should try to avoid to assume that others know what you are referring to. This PURGE
method is not even a standard HTTP method:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
But I can see that Nginx seems to have “invented” it
You can use match
:
https://hexdocs.pm/phoenix/Phoenix.Router.html#match/5
You may want to create a custom plug to use the match
:
Oh, it seems that you posted while I was writing mine. Sorry for the overlap
1 Like
Thanks.
1 Like