include all, exclude some apple-app-site-association

With the new iOS 13 apple-app-site-association, is there a way to include all urls, but exclude a specific partial path?

Code Block
"components": [
{
"/": "/*",
"comment": "Matches any URL whose path starts with /"
},
{
"/" : "/e/*",
"exclude": true,
"comment": "Exclude matches any URL whose path starts with /e/"
},
{
"/": "/user/*",
"exclude": true,
"comment": "Exclude matches any URL whose path starts with /user/"
}
]


We don't want to have to specify every possible path that our App can handle or include.

But we do want to exclude /user/* and /e/*

Our above settings are still allowing /user/* and /e/* despite the "exclude" : truedirectives. I think the "/": "/*" is too inclusive.

Are we now forced to specify every possible path from root in order to exclude specific ones?

The previous format made it easier to match "paths": ["NOT /e/*", "NOT /user/*", "*","/"]

Do I need to state the exclude commands first?

Replies

The first rule matching makes it stop and apply the rule (exclusion or not). So you have to have your exclusions first:

      {
        "/" : "/e/*",
        "exclude": true,
        "comment": "Exclude matches any URL whose path starts with /e/"
      },
      {
        "/": "/user/*",
        "exclude": true,
        "comment": "Exclude matches any URL whose path starts with /user/"
      },
      {
        "/": "/*",
        "comment": "Matches any URL whose path starts with /"
      }
    ]