Continuing the discussion from WP APO : Wordpress on domain and subdomain :
Hello Dear @yevgen :
I did follow the instructions and was able to enable the APO for my subdomain on my cards using the global API token for my subdomain and a newly generated token for my root domain. My subdomain appears on my APO card.
When I check my headers, I still see
cf-apo-via: origin,cookie
cf-cache-status: DYNAMIC
cf-edge-cache: cache,platform=wordpress
I have flushed my cookies a number of times in multiple times, using different machines and browsers but still I get the same results.
Am I missing something?
Can this be because of WooCommerce or YITH Wishlist Plugin Cookie? It the cookie is the reason, is there a way of going around it?
My subdomain in question is https://shop.doctorkaraca.com .
CC: @Oleh , @Kris.R , @whistles
Full headers are like this:
cf-apo-via: origin,cookie
cf-cache-status: DYNAMIC
cf-edge-cache: cache,platform=wordpress
cf-ray: 5f7179527d313324-CDG
cf-request-id: 069aca278e00003324e4a1a000000001
content-encoding: br
content-type: text/html; charset=UTF-8
date: Tue, 24 Nov 2020 07:39:06 GMT
expect-ct: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct ”
link: https://shop.doctorkaraca.com/wp-json/ ; rel=“https://api.w.org/ ”, https://shop.doctorkaraca.com/wp-json/wp/v2/pages/248 ; rel=“alternate”; type=“application/json”, https://shop.doctorkaraca.com/ ; rel=shortlink
nel: {“report_to”:“cf-nel”,“max_age”:604800}
report-to: {“endpoints”:[{“url”:“https://a.nel.Cloudflare.com/report?s=V00zVR4OvPK4iRSLc1tNQyOHhlaA%2BF0cKzuC9NAx7RN980lt1AVJodKwwRbKoqensj1cPie%2BhhjY2QRBiCn8fAtDwSmm3p6M5viZbQqlqmh8HadbfZw%3D”}],“group”:“cf-nel”,“max_age”:604800}
server: Cloudflare
set-cookie: __cfduid=d2e8b250b2b3461eb1b61cac16ff793d51606203543; expires=Thu, 24-Dec-20 07:39:03 GMT; path=/; domain=.doctorkaraca.com ; HttpOnly; SameSite=Lax
set-cookie: yith_wcwl_session_a1d8d7d6c4318796673de58435c4272f=%7B%22session_id%22%3A%220cf2962d09ef7a1750520324a8b2a1c4%22%2C%22session_expiration%22%3A1608795546%2C%22session_expiring%22%3A1608791946%2C%22cookie_hash%22%3A%22d6c1b9e3e7200564dbe723f629dfdcdb%22%7D; expires=Thu, 24-Dec-2020 07:39:06 GMT; Max-Age=2592000; path=/; secure; HttpOnly
vary: Accept-Encoding,User-Agent
Oleh
November 24, 2020, 6:35am
2
Hello @doctorkaraca ,
I confirm the issue.
Yesterday the cache was working on a subdomain, today it is not (https://ru.youritpm.com ).
HTTP/1.1 200 OK =>
Date => Tue, 24 Nov 2020 06:29:38 GMT
Content-Type => text/html; charset=UTF-8
Connection => close
Set-Cookie => __cf_bm=ef99108e90a9394349c035d7dc630ba10b2c4eb9-1606199378-1800-Af9jIk/kpCi1AUUx6K//JHe3gOUylsSPLVGGAr2gJQKH; path=/; expires=Tue, 24-Nov-20 06:59:38 GMT; domain=.youritpm.com ; HttpOnly; Secure; SameSite=None
CF-Ray => 5f7113a01e37f112-IAD
Link => ; rel=“https://api.w.org/ ”, ; rel=“alternate”; type=“application/json”, ; rel=shortlink
CF-Cache-Status => DYNAMIC
cf-apo-via => origin,nohtml
cf-edge-cache => cache,platform=wordpress
cf-request-id => 069a8a98110000f112be8ed000000001
Expect-CT => max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct ”
Report-To => {“endpoints”:[{“url”:“https://a.nel.Cloudflare.com/report?s=MK5To6iwEpITyV%2B5BRlTju5QxR%2FYEp25xSlGVW5Sgd%2FVXpiNl%2BJWGHi5s8e2X%2FZidTqxYuqAiiR7xVAAUdyVDIQdrOhkwmPF6MUeVFiir6M%3D”}],“group”:“cf-nel”,“max_age”:604800}
NEL => {“report_to”:“cf-nel”,“max_age”:604800}
Server => Cloudflare
Oleh
November 24, 2020, 10:53am
3
Looks like APO works now.
HTTP/1.1 200 OK =>
Date => Tue, 24 Nov 2020 10:50:47 GMT
Content-Type => text/html; charset=UTF-8
Connection => close
Set-Cookie => __cf_bm=d2c644d8632f934623f6d34e13bffe890e075470-1606215047-1800-Aesb5931+FqXMtBUkEoRlKRGG26Fy3opQyzfJGqPUcvI; path=/; expires=Tue, 24-Nov-20 11:20:47 GMT; domain=.youritpm.com ; HttpOnly; Secure; SameSite=None
Link => ; rel=“https://api.w.org/ ”, ; rel=“alternate”; type=“application/json”, ; rel=shortlink
CF-Cache-Status => HIT
cf-apo-via => kv
cf-edge-cache => cache,platform=wordpress
cf-request-id => 069b79afcf00002605c8b4e000000001
Expect-CT => max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct ”
Report-To => {“endpoints”:[{“url”:“https://a.nel.Cloudflare.com/report?s=TV36%2Bn6rmi5GlPRR5nfaLhYCzIqLNm4urfX690cIAoSRCKL47b6BhRNbNWsZGYZGUiBVtL3N55sM%2FNae4oxwNOjhj%2Bc13kNuKleXXN2FgbA%3D”}],“group”:“cf-nel”,“max_age”:604800}
NEL => {“report_to”:“cf-nel”,“max_age”:604800}
Server => Cloudflare
CF-RAY => 5f72922c79b32605-IAD
@doctorkaraca
yevgen
November 24, 2020, 11:10am
4
Good to know, for a reference there is no difference how APO works on subdomain vs root. The only reason why we restricted access from the beginning was to make sure we ran APO only against WordPress sites, ideally with CF plugin installed.
1 Like
And to answer my own dumb question, yes, it was the presence of WooCommerce and YITH wishlist cookies that was preventing the cached pages from showing. Once disabled, subdomain caching via APO works like a charm. Great job and thank you very much for your hard work!
2 Likes
system
Closed
November 25, 2020, 11:27am
6
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.