Granular access for endpoints failing (allowed_urls) -> Access to this resource has been disallowed

Alright, it worked! :slight_smile:
Thanks a lot for your help @Olu .

[Secure your APIs by Method and Path] - Fyi, I’m pretty sure I followed this example and it didn’t work.

"allowed_urls": [
        {
            "url": "/resource/(.*)",
            "methods": ["GET", "POST"]
        }
    ]

The code below worked for me.

"allowed_urls": [
    {
        "url": "/demoapi(.*)$", # if root path is required
        "methods": ["GET" ]
    },
    {
        "url": "/demoapi/ping(.*)$",  # remove the previous line and get only __ping__
        "methods": ["GET" ]
    }
]

Thanks,
Daniel

1 Like