@scottalanmiller Those are fair points. In this particular instance I'm less concerned about improving site performance than on capitalizing on CloudFront's other features, like WAF integration.
Sounds like I'm in a very small niche here.
@scottalanmiller Those are fair points. In this particular instance I'm less concerned about improving site performance than on capitalizing on CloudFront's other features, like WAF integration.
Sounds like I'm in a very small niche here.
@PitaJ I saw that but it looked like it wouldn't fit my requirements. That is to say, it appears that NodeBB would still the first-responder to requests; it just alters paths to various static assets so that they will be accessed through the CDN.
Instead what I'm hoping for is for the CDN to be the first-responder for all requests, with a rule-set that causes it to pass-through requests that shouldn't be cached and interdict requests that can be cached.
I'd like to move my NodeBB installation behind a web cache (AWS CloudFront in my case).
This raises the question: which resources are cache-compatible? What does a successful caching configuration look like for a NodeBB site?
Generally, we would want to forward query strings and cookies to the origin, as these are integral to NodeBB's operation. And It seems like a good idea to disable caching on the /admin/ and /api/admin/ paths. But what else?
Do you have experience setting up something like this?
Attempting to do Unicode-friendly text manipulation is the worst kind of special.
Oh wait! Fixed it. It appears the issue was simply script initialization order. My plugin.json now has this:
"scripts": [
"../../public/vendor/xregexp/unicode/unicode-categories.js",
"public/main.js"
],
(Where main.js is my script that uses XRegExp.) And it works fine. The first time I tried this, the scripts were in reverse order. No need to copy the script into my plugin, though that did help me figure out the issue. Thanks for the suggestion!
No luck trying clientScripts
(neither the base path as you have it, nor prefixed with "../.."). I don't see clientScripts
in the docs... how is that different from scripts
?
Copying the script into my plugin is an acceptable workaround, I suppose.
I need additional XRegExp addons for my plugin's client script (to support character categories like \pN). It appears NodeBB includes xregexp
(core) and unicode-base
by default; how can I add unicode-categories
?
I've tried adding ../../public/vendor/xregexp/unicode/unicode-categories.js
to my plugin's scripts as well as modules to no avail (my understanding of what modules is used for is a little fuzzy). In any case, I get "SyntaxError: Unknown Unicode token \pN" when the script runs.
\pL works fine, presumably because that's provided in unicode-base
.
Thanks!
@julian Any chance you would make it available via paid license for a self-host?
Has there been any development towards this feature? I ran across this gist which suggests a Zendesk plugin exists, but I can't find which plugin it refers to. https://gist.github.com/psychobunny/e5632f818accfd81209e493909f27cdf