nelmio_cors:
    defaults:
        origin_regex: true
        allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
        allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
        allow_headers: ['Content-Type', 'Authorization', 'tokenOtp', 'X-Client-Link']
        expose_headers: ['Link']
        max_age: 3600
        allow_credentials: true

    paths:
        '^/api/':
            origin_regex: true
            allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
            allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
            allow_headers: ['Content-Type', 'Authorization', 'tokenOtp', 'X-Client-Link']
            expose_headers: ['Link']
            max_age: 3600
            allow_credentials: true

        '^/uploads/user/qrcode/':
            origin_regex: true
            allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
            allow_headers: ['Content-Type', 'Authorization', 'tokenOtp', 'X-Client-Link']
            allow_methods: ['POST', 'PUT', 'GET', 'DELETE', 'OPTIONS']
            max_age: 3600
            allow_credentials: true
 