Closed kingramizy closed 1 year ago
I have the same problem. My config is:
nelmio_cors:
defaults:
origin_regex: true
allow_origin: ['*']
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
allow_headers: ['*']
max_age: 3600
paths:
'^/': ~
What errors do you get? Because in the end it was not Nelmio but Apache what caused my problem.
I just get a 405 without any message But I am using Nginx
I have the same problem. Any idea?
it's bug in bundle, explained here: https://github.com/nelmio/NelmioCorsBundle/issues/21#issuecomment-418023782
I configure nelmio for my api, (I use fosrestbundle and symfony 3.4)
my config.yml :
one of my actions :
when I call this function: / api / v1 / language in GET I have :
{ "error": { "code": 405, "message": "Method Not Allowed", "exception": [ { "message": "No route found for \"OPTIONS /api/v1/langue\": Method Not Allowed (Allow: GET)", "class": "Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException",
what is wrong in my configuration?