Skip to content

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

@pawel-siejba

Description

@pawel-siejba

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.

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