fastly/fastly-magento2

Maintenance page cant load files from magento (css, images...) returns 503

Closed this issue · 2 comments

The maintenance page is not able to load files (images and css) that are inside pub/error when maintenance is enabled.
This goes through:
`
if (table.lookup(magentomodule_config, "allow_super_users_during_maint", "0") == "1" &&
!req.http.Fastly-Client-Ip ~ maint_allowlist &&
!req.url ~ "^/(index.php/)?suadmin/" &&
!req.url ~ "^/pub/static/") {

And should be:
if (table.lookup(magentomodule_config, "allow_super_users_during_maint", "0") == "1" &&
!req.http.Fastly-Client-Ip ~ maint_allowlist &&
!req.url ~ "^/(index.php/)?suadmin/" &&
!req.url ~ "^/pub/(static|error)/") {
`
This way we can use the same files in the maintenance of magento and in the maintenance of fastly.

Fixed here ca4b05a.

Will go out as 1.2.188.

Sorry, forgot to update the issue.

The change should be:
^(\/pub\/|\/)(static|error)\/

Since in magento, the error directory is in the root of the project.