-
Notifications
You must be signed in to change notification settings - Fork 823
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
fix: by default CanonicalURLMiddleware should run in all environments #11154
Conversation
Pushing this to |
Forcing SSL is still not enabled by default in dev. You'll need to opt in via Injector as you would currently. |
Oh okay I did miss that part, nice _b |
I got caught out on this yesterday :( however it's a big change and might be best to wait to 6? Also any documentation that points to CanonicalURLMiddleware working only in live mode will need to be changed |
Please use the pull request template, which I have added back for you. The following need to be done:
|
CoreKernel::DEV, | ||
CoreKernel::TEST, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't make this change outside of a major release without breaking some peoples' workflows.
Depending on what the issue actually is that you're trying to resolve, there might be another way to tackle it - but if this does turn out to be the correct way to resolve this problem, the PR will need to target the 6
branch and have an associated PR for the CMS 6 changelog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Can you please open a pull request to the 6
branch of developer docs repo to update the CMS 6 changelog (you may need to add a new file for it)?
Please also create an issue and link the two PRs to it so I can track this.
@GuySartorelli updated to v6 now. If you want to see the issue in place have a |
I assume you mean this happens from a fresh installation - there are multiple items of configuration that could change this result, including setting the enabled environments via injector config. |
I'll be happy to merge this once there is a matching PR to the |
Won't it just be automated generated as it's a bug fix? |
The only things that are automatically generated for changelogs are:
Changes to default values in protected member properties are not automatically documented in changelogs - and the potential ramifications and how to change those settings yourself are definitely not automatically documented. |
Done! Created at silverstripe/developer-docs#465 |
Fantastic. Can you please also create an issue and link both PRs to it as per #11154 (comment)? It's harder to track PRs than issues, especially when there are multiple related PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this change
Description
Currently CanonicalURLMiddleware only runs in production, this leads to the classic example of 'It works on mine(tm)' but more dangerously 'It works on the test site (tm)'. Out of the box, we should have as close to production behaviour as possible.
While the benefits don't apply to dev / test environments the side effects of the behaviour definitely apply.
cc @madmatt
Manual testing steps
Issues
Pull request checklist