AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-350256

zuim's questions

Martin Hope
zuim
Asked: 2017-01-22 11:59:49 +0800 CST

Nnginx 在一个位置指令中将 url 映射到 proxy_pass

  • 0

我有多个节点 websocket,可通过与 UNIX 套接字路径匹配的 url 获得。我不想复制 location 指令,而是希望有一个类似 URL 列表的东西,这些 URL 将用作套接字名称。使用正则表达式不起作用,因为我需要套接字名称的路径。

目前我正在使用这个位置:

location /application1/
{
   proxy_pass http://unix:/var/run/nodejs/application1;
   proxy_http_version 1.1;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "upgrade";
}

目标是拥有类似的东西:

$list = [app1, app2, app3];           #list of possible names
location /$list/   #match all names in the list
{
   proxy_pass http://unix:/var/run/nodejs/$list_matched;   #use matched name
   proxy_http_version 1.1;
   proxy_set_header Upgrade $http_upgrade;
   proxy_set_header Connection "upgrade";
}

基本上,列表中的每个 URL 都应该重定向到同名的套接字。

在此先感谢您的帮助:)

nginx proxypass redirection
  • 2 个回答
  • 839 Views
Martin Hope
zuim
Asked: 2016-04-21 08:19:17 +0800 CST

HSTS 使用“includeSubdomains”排除特定子域

  • 4

我在我的网站上使用带有此标头的 HSTS:

 Strict-Transport-Security: max-age=15768000; includeSubDomains

这按预期工作,并强制浏览器将所有 http 连接重定向到 https。

在https://www.rfc-editor.org/rfc/rfc6797#section-6.1.2的文档中,我没有找到排除指定子域的方法!

我已经尝试max-age=0为子域添加,但它不会覆盖includeSubDomains

是否可以从includeSubDomains规则中排除子域?或者是删除此规则并仅对某些网站使用 HSTS 标头的唯一方法?PS:我的网络服务器是 NGINX,我用 firefox 和 chrome 测试了这个行为。

nginx https http-headers
  • 1 个回答
  • 4512 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve