Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Darkscribes Community

C

[email protected]

@[email protected]
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

View Original

Posts

Recent Best Controversial

  • Cloudflare Caching
    C [email protected]

    To minimize load on our servers, I would like to set Cloudflare to cache as much of the content as possible.
    I'm assuming that any image files or anything with a css/js/json file extension is safe to cache.
    Obviously we can't cache html content for logged-in users, since there is user-specific data included in the headers.
    As far as I can tell, it should be safe to cache html content for guests as long as the TTL is short (guests cannot post on our site, if that's relevant). However, it's not clear how we can implement that. The express.sid cookie is set for guests, so we can't just cache when that cookie is absent. It should be possible to set a custom cookie on login and clear that cookie on logout, but I can't find anywhere to set that cookie. I'm using a fork of https://github.com/julianlam/nodebb-plugin-sso-oauth, and the only place I can find a res object is https://github.com/julianlam/nodebb-plugin-sso-oauth/blob/master/library.js#L124, but setting the cookie fails because res.cookie is undefined.

    Is there any way I can set a custom cookie on login, or ensure that NodeBB does not set an express.sid cookie for guests?

    Uncategorized
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups