JackMaarek
Cannot get post parameter when using cors_plug
Hello guys,
I’m having trouble when I’m using cors_plug,
I have my front end app that uses elm to send GET or POST requests and uses preflight validation with OPTIONS request, I do get the translated post request but the parameters are empty.
I do not quite understand what’s the problem I think that the post request is sent in the body of the OPTIONS request and so the controller cannot get that body…
I followed the instructions of CorsPlug — cors_plug v3.0.3 to install and initialize cors to handle the preflight validation.
If someone got an idea I will be more than thankeful.
Thanks for your time and attention.
Ps: If you need any detailed information about the router or controller you can get everything on my repo: https://github.com/HETIC-MT-P2021/aio-group3-proj01/tree/feat_new-category-view or ask me on the topic I will be reactive.
Most Liked
dimitarvp
Did you try it in dev mode, on your machine? If so, what did the Phoenix log/output look like?
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








