Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Allow urls without .html for CMS. #936

Merged
merged 3 commits into from
Mar 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/venia-concept/venia-upward.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ cmsPageResult:
urlKey:
when:
- matches: request.url.pathname
pattern: '^/(?:(.*)\.html)?'
pattern: '^/(?:(.*))?'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the right idea (until we have the store config introspection requested in magento/graphql-ce#535) but it needs to go further down in the stack. Since CMS pages have no suffixes, they now live in the same namespace as some of our hardcoded routes, like checkout. Those hardcoded routes need to resolve first--otherwise, an administrator could accidentally break their store by writing an SEO Friendly URL that conflicts with a builtin PWA route, AND, UPWARD would place the urlResolver call unnecessarily for every single request.

use: $match.$1
default:
inline: ''
Expand Down