[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.9.1.1

No permission to download
Does anyone know anything about virus scanning from Cloudflare R2 storage? I'm trying to find a solution for potential viruses being uploaded to XFRM but seems like Cloudflare "AV" only scans smaller files less then 15mb
 
Does anyone know anything about virus scanning from Cloudflare R2 storage? I'm trying to find a solution for potential viruses being uploaded to XFRM but seems like Cloudflare "AV" only scans smaller files less then 15mb
As you said, Cloudflare doesn't scan anything over 15MB (there is no "solution" to force them to scan files bigger than 15MB).

Files larger than 15MB cannot be scanned.
 
As you said, Cloudflare doesn't scan anything over 15MB (there is no "solution" to force them to scan files bigger than 15MB).

Thanks Digitalpoint. Looks like I'll need to find another solution. Wish xenforo had an addon that addresses this so I don't have to manually download each resource then scan separately before approving it.

If anyone has any ideas please tell! I was going to scan using cronjob on Linux but with a remote storage route not sure how to go about it now.
 
Thanks Digitalpoint. Looks like I'll need to find another solution. Wish xenforo had an addon that addresses this so I don't have to manually download each resource then scan separately before approving it.

If anyone has any ideas please tell! I was going to scan using cronjob on Linux but with a remote storage route not sure how to go about it now.
You could run all attachments through virustotal before uploading to s3.
This is going to require a custom built addon though.

 
Last edited:
Can someone tell me something about unique visitors?
A page that has normally 10,000 unique a day (google says this), should have now 22,000 unique a day (cloudflare says)

What should I believe?
 
Can someone tell me something about unique visitors?
A page that has normally 10,000 unique a day (google says this), should have now 22,000 unique a day (cloudflare says)

What should I believe?
Use Google.

https://plausible.io/vs-cloudflare-web-analytics#:~:text=Different definitions of unique visitor,-Plausible Analytics and&text=Basically Cloudflare counts the number,differ from other analytics tools”.

Like Plausible Analytics, Cloudflare Web Analytics doesn’t use cookies nor local storage to track visitors so a different method of counting is necessary.

In Cloudflare Web Analytics, “a visit is a successful page view that has an HTTP referrer that doesn’t match the hostname of the request”.

Basically Cloudflare counts the number of times someone landed on any page of your site from another site. They say that “you should expect this number to differ from other analytics tools”

If the same person visits your site ten times in one day, Cloudflare Web Analytics lists that person as ten unique visitors while tools such as Plausible Analytics will show that visitor as one unique.
 

The option description says not to turn it on if you want XF to decide who has permission to view it.


R2 is fantastic for XenForo, the fact that you can offload your storage to the cloud and not worry about backups and all that for a crazy cheap price (for example it’s $1.35 per month as the total cost for 100GB worth of files).

Just had an idea. I know you talked about not putting stuff like DKIM keys into R2. What if we did but your addon makes it so when those files in internal_data are edited, it updates them in the R2 as a background job, in that way it automatically backs up this data while still accessing and using it from the local directory.
 
The option description says not to turn it on if you want XF to decide who has permission to view it.

Just had an idea. I know you talked about not putting stuff like DKIM keys into R2. What if we did but your addon makes it so when those files in internal_data are edited, it updates them in the R2 as a background job, in that way it automatically backs up this data while still accessing and using it from the local directory.
Not really how XenForo's abstracted filesystem works (I guess unless someone made a new abstracted filesystem adapter to write to two different places... could be done, but not sure it's worth the effort for key backup).

If you want something better than local filesystem for DKIM keys, this will put the contents of the internal-data://keys directory into XenForo's data registry (doesn't need to read from disk any longer, stored in the database and can read from memcache or other caching mechanisms a site has in place).

 
Just had an idea. I know you talked about not putting stuff like DKIM keys into R2. What if we did but your addon makes it so when those files in internal_data are edited, it updates them in the R2 as a background job, in that way it automatically backs up this data while still accessing and using it from the local directory.
Or you can mount R2 storage as local storage. I use JuiceFS to mount my R2 storage to my server. System. just sees it as a local storage https://github.com/centminmod/centminmod-juicefs

Code:
df -hT /home/juicefs_mount
Filesystem        Type          Size  Used Avail Use% Mounted on
JuiceFS:myjuicefs fuse.juicefs  1.0P  4.0K  1.0P   1% /home/juicefs_mount
 
Thanks Digitalpoint. Looks like I'll need to find another solution. Wish xenforo had an addon that addresses this so I don't have to manually download each resource then scan separately before approving it.

If anyone has any ideas please tell! I was going to scan using cronjob on Linux but with a remote storage route not sure how to go about it now.
You tried this? Dunno if it works.
 
Or you can mount R2 storage as local storage. I use JuiceFS to mount my R2 storage to my server. System. just sees it as a local storage https://github.com/centminmod/centminmod-juicefs

Code:
df -hT /home/juicefs_mount
Filesystem        Type          Size  Used Avail Use% Mounted on
JuiceFS:myjuicefs fuse.juicefs  1.0P  4.0K  1.0P   1% /home/juicefs_mount
but - does that use os file cache? or is it still mostly making web requests :O
 
but - does that use os file cache? or is it still mostly making web requests :O
Yes uses both OS file cache and meta data caching - see benchmark section https://github.com/centminmod/centminmod-juicefs and then if your mounted R2 data is served over Cloudflare orange cloud proxied CDN cache, then you leverage CDN cache for serving such files in R2 local mounted storage :)

ITEMVALUE (100x R2 Sharded + Redis)COST (100x R2 Sharded + Redis)VALUE (61x R2 Sharded + Redis)COST (61x R2 Sharded + Redis)VALUE (21x R2 Sharded + Redis)COST (21x R2 Sharded + Redis)VALUE (10x R2 Sharded + Redis)COST (10x R2 Sharded + Redis)VALUE (1x R2 Default)COST (1x R2 Default)
Write big file637.16 MiB/s0.01 s/file617.15 MiB/s0.01 s/file600.01 MiB/s0.01 s/file530.10 MiB/s0.01 s/file230.82 MiB/s0.02 s/file
Read big file1764.73 MiB/s0.00 s/file1600.85 MiB/s0.00 s/file1300.69 MiB/s0.00 s/file1914.40 MiB/s0.00 s/file1276.38 MiB/s0.00 s/file
Write small file2666.9 files/s3.00 ms/file2808.3 files/s1.42 ms/file2648.3 files/s1.51 ms/file2715.4 files/s1.47 ms/file675.7 files/s5.92 ms/file
Read small file10905.8 files/s0.73 ms/file10154.0 files/s0.39 ms/file10442.4 files/s0.38 ms/file10069.0 files/s0.40 ms/file7833.1 files/s0.51 ms/file
Stat file22475.0 files/s0.36 ms/file15935.2 files/s0.25 ms/file16277.5 files/s0.25 ms/file16545.3 files/s0.24 ms/file28226.1 files/s0.14 ms/file
FUSE operation11485 operations0.12 ms/op5761 operations0.09 ms/op5765 operations0.09 ms/op5767 operations0.09 ms/op5756 operations0.41 ms/op
Update meta3233 operations0.19 ms/op1617 operations0.19 ms/op1617 operations0.18 ms/op1617 operations0.19 ms/op5770 operations0.70 ms/op
Put object735 operations344.93 ms/op32 operations377.01 ms/op30 operations369.65 ms/op37 operations290.94 ms/op118 operations242.35 ms/op
Get object0 operations0.00 ms/op0 operations0.00 ms/op0 operations0.00 ms/op0 operations0.00 ms/op0 operations0.00 ms/op
Delete object117 operations123.92 ms/op76 operations189.67 ms/op22 operations268.03 ms/op48 operations103.83 ms/op95 operations83.94 ms/op
Write into cache808 operations0.13 ms/op404 operations0.11 ms/op404 operations0.11 ms/op404 operations0.11 ms/op404 operations0.14 ms/op
Read from cache816 operations0.13 ms/op408 operations0.07 ms/op408 operations0.08 ms/op408 operations0.06 ms/op408 operations0.06 ms/op
 
Befoe cloudflare I had some lines in my htacess to have always:

www

should I add this again or add this somewhere at cloudflare?
 
Not sure what you are trying to do or what you were trying to do before Cloudflare with "www". This thread is just about the Cloudflare addon and there's nothing in the addon that will do anything with "www" from your web server config if that's your question?

If it's a question about your Cloudflare account and not this addon, the various places you can get Cloudflare support is outlined here (different options depending on your zone tier):

 
Some things are done now from Cloudflare, like

Code:
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

So, I have deleted this in my .htaccess.

Another thing is this:

Code:
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

From my point of view, it makes sense, that this happens at Cloudflare and not in my .htaccess.
So I have asked if someone knows where to tell Cloudflare to care for that also.
 
Answer: Go to Rules > Page rules

Code:
https://domain.com/*

forward to

https://www.domain.com/$1

301 permanent redirect

corrected
 
Last edited:
Some things are done now from Cloudflare, like

Code:
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

So, I have deleted this in my .htaccess.

Another thing is this:

Code:
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

From my point of view, it makes sense, that this happens at Cloudflare and not in my .htaccess.
So I have asked if someone knows where to tell Cloudflare to care for that also.

Answer: Go to Rules > Page rules

domain.com/*
forward to

301 permanent redirect

I think his point was that what you're saying shouldn't be posted in this thread. This thread should only be used for discussion related to the App for Cloudflare® add-on.
 
Why so strict? I am sure many people don't know it.
Why not help? Have corrected the code above, it is:

Code:
https://domain.com/*
forward to
https://www.domain.com/$1
301 permanent redirect

and the always https:// is set under ssl/tls/edge? Then it needs no more page rules (maybe) :)
 
Always Use HTTPS is already part of the addon settings along with HSTS settings. Which you can enable. It can be risky in some cases. But would ensure that http is not used at all.
 
Back
Top Bottom