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

Respect turbo-visit-control for frame requests #867

Merged
merged 1 commit into from
Feb 7, 2023

Commits on Feb 7, 2023

  1. Respect turbo-visit-control for frame requests

    Turbo normally performs a fill page reload whenever a response contains
    the appropriate `turbo-visit-control` meta tag:
    
        <meta name="turbo-visit-control" content="reload">
    
    Such responses are considered "not visitable".
    
    For frame requests, we have previously been ignoring any
    `turbo-visit-control` set in the response, and instead treating all
    valid frame responses as "visitable".
    
    This commit changes this behaviour so that `turbo-visit-control` will be
    treated consistently for both frame and non-frame requests.
    
    As well as being more consistent, this provides a useful escape hatch
    for situations where a frame request redirects to something that should
    be a full page reload, but which would be prevented due to that content
    missing the expected frame. The class example of this is when an expired
    session causes a frame request to be redirected to a login page. By
    including `turbo-visit-control` on that login page, we can ensure that
    it is always rendered as a full page, and never hidden by a failed frame
    request.
    kevinmcconnell committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    cb61ece View commit details
    Browse the repository at this point in the history