ScandiPWA dedicated router
Module is providing custom router to properly resolve HTTP codes on specific page request.
Custom router is now checking theme type in order to support URL rewrites.
You must ensure PWA theme type is set to
4 to utilize the options.
Installer is doing this automatically for any newly generated theme.
For already generated theme please update manually: set PWA theme type to
composer require scandipwa/route717
Module is providing validators for such entities: 1) Product (/product) 2) Category (/category) 3) Cms pages (/page) 4) Cart (/cart) 5) Root (/)
Each frontend path (Magento 2 front name) should be added to validator list in
src/etc/di.xml. Depending on entity
type it might have more or less complex validation logic, to i.e. determine if specific product exists or not.
Router is only responding 200 OK to entities, which it was able to validate. Otherwise it is falling back to default
Magento 2 routers.
To add new path you must provide your own validator, that must implement
register it as an array element passed to
In order to allow Magento 2 to handle some routes in default manner (only serverside functionality) you must allow
specific routes to be accessed by adding RegExp to
src/app/etc/di.xml::ignoredURLs arguments list.
So far there are 3 paths whitelisted out of the box:
/newsletter/subscriber/confirm - subscribe to newsletter
/newsletter/subscriber/unsubscribe - unsubscribe to newsletter
/customer/account/confirm/ - confirm e-mail (redirect to homepage in any case, modify according to your needs)