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

Symfony integrated HttpCache reverse proxy cannot serve cached responses #134

Open
Aleksa1996 opened this issue Dec 15, 2023 · 0 comments
Open

Comments

@Aleksa1996
Copy link

Aleksa1996 commented Dec 15, 2023

Booting Kernel happens here, before request handling:

$this->kernel->boot();

So that booting is preventing this line to trigger HttpCache reverse proxy:
https://github.com/symfony/http-kernel/blob/1352be19da94ca65d54d20f977b85cee1b397f35/Kernel.php#L172

My suggestion would be to edit this:

$services->set(KernelHandler::class)

replace:

$services->set(KernelHandler::class)
        ->args([
            service('kernel'),
        ]);

with something like this:

$services->set(KernelHandler::class)
        ->args([
            service('http_cache'),
        ]);

Also we maybe need to check if http_cache is enabled in framework.yaml ?

As im not expert in this, are there any better suggestions how to solve it ? :)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant