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

Admin First Byte Timeout setting does not work for admin URLs including checkout string. #699

Open
pawel-siejba opened this issue Jun 17, 2024 · 0 comments

Comments

@pawel-siejba
Copy link
Contributor

In the recv VCL snippet, something is considered an admin URL if it has the ####ADMIN_PATH#### AND req.url ~ "/(checkout|customer/section/load)" is false.

However, some admin paths, e.g config, contain the 'checkout' string in them.
For example Admin > Config > Sales > Checkout.

The following is the if/else statement with the bug present:
https://github.com/fastly/fastly-magento2/blob/master/etc/vcl_snippets/recv.vcl#L154
if (!req.http.x-long-cache && req.url ~ "/(checkout|customer/section/load)") { set req.http.x-pass = "1"; # Pass all admin actions # ####ADMIN_PATH#### is replaced with value of frontName from app/etc/env.php } else if ( req.url ~ "^/(index\.php/)?####ADMIN_PATH####/" ) { set req.http.x-pass = "1"; set req.http.magento-admin-path = "1"; }

This bug essentially means, that later, all of the parts of VCL relying on req.http.magento-admin-path won't work for these select few Admin paths containing checkout string in the URL.

Currently there's one snippet relying on it - setting the admin byte timeout.

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