futtta / ao_critcss_aas

Autoptimize power-up to integrate with criticalcss.com
9 stars 1 forks source link

filter to alter URL submitted to ccss.com #53

Closed futtta closed 6 years ago

futtta commented 6 years ago

cfr. Dr Paul;

add_filter('autoptimize_ccss_fullurl','enforce_staging2');
function enforce_staging2($in) {
    return str_replace('www.guide2getting.com','www.staging2.guide2getting.com',$in); 
}
denydias commented 6 years ago

Is this really needed? I mean, if a dev is cautious enough to have a stage env (kudos to her!), what is the benefit to trigger a rule in the prod site redirecting the request to stage?

futtta commented 6 years ago

it is; on wpengine the site_url of staging and prod are the same (the prod one), so AO CCSS was inadvertently telling ccss.com to fetch from the prod i.s.o. the staging site.

On Mon, Jul 30, 2018 at 9:51 PM, Deny Dias notifications@github.com wrote:

Is this really needed? I mean, if a dev is cautious enough to have a staging env (kudos to her!), what is the benefit to trigger a rule in the prod site redirecting the request to sating?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/futtta/ao_critcss_aas/issues/53#issuecomment-408988231, or mute the thread https://github.com/notifications/unsubscribe-auth/AALEMY3GlnScQBH43zBqrc2U2-swe5Peks5uL2OzgaJpZM4VnC3W .

denydias commented 6 years ago

Oh! I see! wpengine - as always - being wpengine and providing a confusing service for their users.