Skip to content

redirect()->to() problem with output buffering #769

Description

@gustavojm

I have an AdminController class that all the rest of the controllers will extend.
in the constructor of AdminController I check if the user is already logged, otherwise...

redirect()->to('/admin/user/login');

but it doesn't get redirected, even though I see the 'Location;' header sent to the browser correctly.
Seems to be a problem with the output buffering

For it to work I should do

redirect()->to('/admin/user/login');
ob_end_flush();

should we make the redirect()->to() method call ob_end_flush()?

Thanks in advance!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions