I’ve got a single page app which I’d like to protect with a role based redirect rule.
Individually, they both work:
I can handle the SPA push state with:
/* index.html 200
And I can handle the role based redirects with:
/* /:splat 200! Role=*
But I can’t seem to be able to combine both… Adding Role seems to prevent the shadowing and causes everything to be replaced by index.html, so for example this doesn’t work:
/* /index.html 200 Role=*
/* /:splat 200! Role=*
Because my js files, which exist, get replaced with the content of index.html…
Is this a limitation of the system or am I just not doing it the right way?
I don’t think you’ll want the second redirect at least not as you have it written - that says that /asset.png should be served by /index.html which would be problematic, right? Is there more than an index file in the repo? If so, the first one should do the trick, but you’ll want “something else” to do with the main content for unauthenticated visitors, as shown in this example:
at present, role based redirects are, as mentioned above, only available for business accounts. It is possible that we may change the pricing structure at some point, but I don’t think it will happen in the near future. You can read more about current pricing and addons here:
hi JadeQuo, password protection is available for Pro plans, which are $49 a month, business is a tier higher - depending on your needs, maybe the pro plan would suffice?