nelmio / NelmioCorsBundle

Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony application
https://symfony.com/bundles/NelmioCorsBundle/
MIT License
1.89k stars 108 forks source link

How can i block postman request ?? #106

Closed paoloBirdOffice closed 6 years ago

paoloBirdOffice commented 6 years ago

Hello, I'm using Nelmio wit api platform, And i try to block all the request execpet from specific servor, My probleme is that i can still do request with postman, i set the allow origin but post man can still call it. Thank alot Paolo

nelmio_cors:
    defaults:
        origin_regex: true
        allow_origin: [ 'http://blabla.com*$']
        allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
        allow_headers: ['Content-Type', 'Authorization']
        expose_headers: ['Link']
        max_age: 3600
    paths:
        '^/': ~
ricardosaracino commented 6 years ago

is postman running on the same domain.. ie localhost? or has this been tested in a environment other than local?