nelmio/NelmioCorsBundle

How to filter by host

asuri0n opened this issue · 1 comments

Hi,
I would like to set a specific configuration for my API subdomain (api.domain.com) but I can't set it up with paths:

my actual configuration :

nelmio_cors:
  defaults:
    allow_credentials: true
    origin_regex: true
    allow_origin: ['*','*/*']
    allow_methods: ['GET', 'PUT']
    allow_headers: ['Content-Type', 'Authorization']
    max_age: 3600
  paths:
    '^/': ~

This is not working :

...
paths:
  'api\.%base_host%':

Thanks for your help

hi @asuri0n, did you find a way to fix your issue?