I want to configure middleware to exclude certain paths from basic auth. I am able to do this like the following:
config.middleware.insert_after(::Rack::Lock, "AuthenticateExcluding", realm: "Staging", exclude: ["/webhooks/stripe", "/api/v2/gadgets"]) do |u, p|
However, I would like to exclude a all routes that match a certain pattern such as /api/v2/gadgets/:gadget_id/specs
(contrived example). Is this possible?
I found a similar question here, but it seems like they were trying to do something a little different, so perhaps the answer to this question will be different. Thanks for your help!