Hey Everyone!
Hope so you are doing well. I am here with a new query in my mind. I am just want to ask you something about the Elixir Routes in Rest API’s.
There is an Error of CORS Privacy Policy and i resolve it using OPTIONS Routes in Router file like,
pipeline :api do
plug CORSPlug
# ...
end
scope "/api", PhoenixApp do
pipe_through :api
resources "/articles", ArticleController
options "/articles", ArticleController, :options
options "/articles/:id", ArticleController, :options
end
But i am not sure about why we are using these one or why we are duplicating our Routes.
Anyone here can help ??