huettig-und-rompf/webhub-proxy

一个代理脚本,可以在完全隐私的情况下将 Hüttig & Rompf Webhub 片段包含到您的网站中

1.2.1 2021-04-16 16:02 UTC

This package is auto-updated.

Last update: 2024-09-16 23:37:53 UTC


README

此脚本可以安装在您的 web 服务器上,通过您的服务器代理所有对 Huettig 和 Rompf Webhub 的请求。这意味着,绝对没有与隐私相关的数据(如您的用户 IP 地址)被发送到 Huettig 和 Rompf 服务器。因此,您可以在没有额外的“同意”功能的情况下安全地使用片段/计算器,符合 GDPR 要求。

要求

  • PHP >=7.2
  • PHP gzip
  • 启用 mod-rewrite 的 Apache Web 服务器
  • 或使用 额外配置 的 nginx

安装

使用 Composer 安装此包

composer require huettig-und-rompf/webhub-proxy

安装包后

  1. 将“webhub-proxy”目录复制到您的网站公共文档根目录的某个位置。
  2. 在编辑器中打开已复制的“webhub-proxy”目录中的“index.php”。
  3. 调整 $VENDOR_DIR 路径(第 25 行)以匹配您的设置要求。
  4. 将脚本部署到您的生产机器

用法

  1. 访问 在线营销
  2. 选择一个可用的片段
  3. 将嵌入代码复制到您的模板中
  4. 调整第一个脚本标签以匹配您的本地代理设置,例如 <script type="text/javascript" src="https://webhub.huettig-rompf.de/js/snippet"></script> 变为: <script type="text/javascript" src="https://example.org/webhub-proxy/js/snippet"></script>

Nginx 配置

如果您使用 nginx 而不是 Apache 运行网站,请编辑您的配置文件以包含此位置指令

选项 A:在子目录内

server {
    server_name example.com;
    location /webhub-proxy {
       try_files $uri $uri/ /webhub-proxy/index.php?$query_string;
    }
}

选项 B:使用单独的 URL

server {
    server_name webhub-proxy.example.com;
    location / {
       try_files $uri $uri/ /index.php?$query_string;
    }
}