[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.8.4.1

No permission to download
What URL exactly? Things look normal for the couple URLs I checked...

Code:
age: 7370
cf-cache-status: HIT


Ya, that was something not in the addon itself, rather some JavaScript specific to the site. It should already been fixed (if you do a hard refresh, you should get the version where it's fixed).
I tested https://iolabs.io/ first time I visited it it gave me cache HIT .. I logged in then logged out and it is now giving Dynamic .. I noticed that xf_session cookie was not deleted on logout .. this must be the reason if you are using it in rule configuration .
 
BTW .. I just double checked iolabs.io and found the reponse headers have cf-cache-status: DYNAMIC which means it is not working
I believe he updated his cache rules to prevent cache HIT from being served if the visitor has xf_session cookies.
Yeah you already posted above :D
 
I had a few minutes to check (busy few days w/ a funeral)--I now have /data/xfmg and /internal_data/xfmg .

I can see where /data/xfmg would be included in the R2 bucket, but how do I add another for /internal-data/xfmg?
Well, I've never used XFMG, but it shouldn't be too hard to be able to support it with a small change to the R2 adapter that would allow you to do it (and whatever other folders you wanted with a config.php file change) like so:

PHP:
$config['fsAdapters']['internal-data/xfmg'] = function()
{
    return \DigitalPoint\Cloudflare\League\Flysystem\Adapter\R2::getAdapter('internal-data/xfmg', 'your-attachment-bucket');
};

I haven't tested it exactly with XFMG, but it should work in theory (heh).

That would allow you to use the same bucket as your attachments (same private permissions, so you wouldn't need to create a third bucket).

I'll send you an updated adapter file via conversation that I'll include in the next version.

Edit, I guess I won't because you don't allow people to send you private messages. Will be part of the next version though.
 
I believe he updated his cache rules to prevent cache HIT from being served if the visitor has xf_session cookies.
Yeah you already posted above :D
It's not just that... but ya, the whole thing errs on the side of not serving a cache when it's in question (there are other variables as well). But correct... one of those variables is if there's unique session data happening for the user (there are sites I have where I use session data to present non-static content to even guest users, so...)

...although I don't think you should have anything actually in your session in your case. Going to look a little deeper and maybe change the behavior of XenForo if needed (delete session if it doesn't actually contain anything).
 
  • Like
Reactions: rdn
Edit, I guess I won't because you don't allow people to send you private messages. Will be part of the next version though.
No worries--I had a few members harassing me a while back, so it was easier to set the PM permission to "people you follow."

I can wait until the next update--I have enough going on at the moment, unless you want someone to test it out for you. (I follow you now...)
 
Guest caching suggestion:

Hopefully you can integrate something like this into your add-on:
  • Sets "(cookie_prefix)logged_in" (i.e. "xf_logged_in") cookie for logged in users.
  • Displays page as a guest if user is logged in, and cookie isn't present (and sets it again), so that a user can't remove it and cache the page as if they were a guest (while still logged in).
It's very simple but very effective as well.
 
Guest caching suggestion:

Hopefully you can integrate something like this into your add-on:

It's very simple but very effective as well.
Well it's kind of the same thing as we are doing here with xf_session. Normally the cookie isn't set (although it could be in certain cases). But when it is set (even if they aren't logged in) it's probably better to not serve the static content because there might be a reason they have data stored in their session. Personally, I think it probably makes more sense to be cautious with how much cached content you are serving up. If 1% of guest users get non-cached content (for whatever reason), it's not terrible. It probably makes sense to look at the reason why a guest might be getting non-cached content and address each of those reasons vs. just blanket going for "logged in" or "not logged in" because that won't always work (definitely wouldn't work on my sites.

That being said, I made a little change to clear the session (and session cookie) when someone logs out if their session doesn't contain anything anymore (99.9% of the cases).
 
Last edited:
is this a side effect of the new caching feature? confusing because xenforo should not even notice that a guest is hitting the guest cache i imagine? (i have pages full of viewing unknown page in my current visitor log)
 

Attachments

  • 1673587552-Welloff-Amoeba.webp
    1673587552-Welloff-Amoeba.webp
    17.2 KB · Views: 13
digitalpoint updated [DigitalPoint] Cloudflare with a new update entry:

Some minor things

  • Made some minor changes to the logic of when to serve cached pages or not (Guest page caching)
  • If a session is empty (like when a user logs out), go ahead and fully expunge it
  • Made some changes to R2 adapter so it could be configured for extra directories via config.php
  • Added some code to work around XenForo not updating CSRF token in URLs (this bug report)...

Read the rest of this update entry...
 
Just upgraded to 1.5.1 and when logging out of the forum, it goes to a white page with:

The site is currently being upgraded. Please check back later.

It does log me out fine though, but shouldn’t be going to that page.
 
  • Sad
Reactions: rdn
Just upgraded to 1.5.1 and when logging out of the forum, it goes to a white page with:

The site is currently being upgraded. Please check back later.

It does log me out fine though, but shouldn’t be going to that page.
It was something I added to the logic last night (doing a board upgrade). In the meantime, if you flush your Cloudflare Cache under XF Admin -> Setup -> Purge cache, it should sort itself out for now.
 
It was something I added to the logic last night (doing a board upgrade). In the meantime, if you flush your Cloudflare Cache under XF Admin -> Setup -> Purge cache, it should sort itself out for now.
I tried the purge cache, flushed twice and tried on 2 browsers, but still receive the same white page. Very impressed with the speed improvements however.
 
Sorry for the question which has probably been answered.

How do I use rclone to move my data to R2? Can someone explain that part to me, please?
 
Back
Top Bottom