【问题标题】:nginx javascript module persistencenginx javascript模块持久化
【发布时间】:2021-11-09 10:18:18
【问题描述】:

是否可以在nginx的javascript模块中持久化一些数据?

我需要从请求中保护一些数据,以验证是否允许以下​​请求。

【问题讨论】:

  • 请提供足够的代码,以便其他人更好地理解或重现问题。

标签: javascript nginx nginx-reverse-proxy nginx-config njs


【解决方案1】:

我会尝试通过写入和读取文件来使用它。 https://github.com/nginx/njs/issues/75 这是有人在使用它。 第二个想法是尝试将其设置为 nginx 变量或其他东西。 https://www.docs4dev.com/docs/en/nginx/current/reference/http-ngx_http_js_module.html

【讨论】:

  • 文件太慢了,我不能在 javascript 中使用 nginx 变量:/
猜你喜欢
  • 2011-06-24
  • 1970-01-01
  • 1970-01-01
  • 2019-08-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多