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
Add debugging information to the MakeResponsePrivateListener #1982
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
leofeyer
previously approved these changes
Jul 24, 2020
aschempp
reviewed
Jul 24, 2020
|
||
return; | ||
} | ||
|
||
// 2) The session was started | ||
if ($request->hasSession() && $request->getSession()->isStarted()) { | ||
$response->setPrivate(); | ||
$this->makePrivate($response, 'session-cookie'); |
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.
should we use session_name()
here?
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.
I don't see any value in this. The name is irrelevant.
Co-authored-by: Andreas Schempp <andreas.schempp@terminal42.ch>
leofeyer
approved these changes
Jul 27, 2020
fritzmg
approved these changes
Jul 27, 2020
Thank you @Toflar. |
leofeyer
changed the title
Added debugging information to the MakeResponsePrivateListener
Add debugging information to the MakeResponsePrivateListener
Aug 10, 2020
leofeyer
pushed a commit
that referenced
this pull request
Aug 12, 2020
Description ----------- This adds support for contao/manager-plugin#29 in manager-plugin 2.9. According to @Toflar this should not be a problem if manager-plugin < 2.9 is installed. The interface name is just a symbol that does not exist, as long as no plugin implement it. If a plugin **does** implement it, it should require the plugin ^2.9. Thanks to the new interface, it will be possible to add cache subscribers to do special handling that should apply to the http cache (as well). In my case, I need to implement geo localization for visitors and dynamically add _sort-of_ preflight header with the country, so responses can `Vary` on it. I would love to have this in the LTS release, similar to #1982 this should not cause any conflicts with existing code or Contao functionality as it is totally separate. Commits ------- 04e4489 Add support for HTTP cache subscribers
leofeyer
pushed a commit
to contao/manager-bundle
that referenced
this pull request
Aug 12, 2020
Description ----------- This adds support for contao/manager-plugin#29 in manager-plugin 2.9. According to @Toflar this should not be a problem if manager-plugin < 2.9 is installed. The interface name is just a symbol that does not exist, as long as no plugin implement it. If a plugin **does** implement it, it should require the plugin ^2.9. Thanks to the new interface, it will be possible to add cache subscribers to do special handling that should apply to the http cache (as well). In my case, I need to implement geo localization for visitors and dynamically add _sort-of_ preflight header with the country, so responses can `Vary` on it. I would love to have this in the LTS release, similar to contao/contao#1982 this should not cause any conflicts with existing code or Contao functionality as it is totally separate. Commits ------- 04e4489a Add support for HTTP cache subscribers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes missing debug information on the
MakeResponsePrivateListener
which bascially leaves you in the dark about why your response was turned into aprivate
response. We should fix that, as people will configure caching in 4.9 for years to come.