Fix tld_length documentation in ActionDispatch::Cookies #31195
Merged
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.
Summary
Change recommendation for tld_length (for sharing cookies across subdomains of a 2-token TLD), to 2 instead of 1 (TLD isn't exactly the right name here, but since that's what the option is called, that's what I'm calling it). This option actually specifies the number of tokens in the root domain across whose subdomains you want to share the cookie. In the example given, it is 2 (
lvh
andme
), so recommending 1 is confusing. (calling it tld_length is also confusing, but c'est la vie) 馃槈With a setting of 2, the domain for the cookie is set to:
.lvh.me
which is the desired result.