chore: 导航链接的 src 改为读配置,去掉代码里的个人域名
面向公开仓库脱敏:高德 URI API 的 src 原先在服务端与前端各写死一份个人域名。 - src/helpers.php / templates/nodes/form.php:src 统一取 `config.php` 的 `amap.nav_src`。 前端模板用 json_encode 输出,与后端同源 —— 原先这个值在两处各写一遍, 注释里也提醒着「改一边就得改另一边」,现在只改配置一处即可。 - config.example.php:新增 `amap.nav_src`,默认占位 `trip.example.com` (src 只是高德侧的来源统计标识,填任意英数字串都能正常工作), 并注明部署时按自己的域名改这一行。 - LICENSE:版权署名由个人昵称改为 The TripLog Authors。 线上配置已同步补上 `nav_src`(保持原有取值),因此**线上行为不变**: 以线上真实代码 + 真实配置跑过 amap_nav_url(),PHP 7.4 与 8.1 产出的 URL 与改动前逐字节一致。 验证:php -l 全过;amap_nav_url 单测 25/25(新增「src 必须来自配置」「源码里不得出现个人域名」 两条守卫,并做了反向验证 —— 把域名写回去时确实会红);渲染检查 386/386; 部署 10 步全绿(双版本 php -l + 静态断言 + 哈希校验 + 数据库迁移 + HTTP 冒烟 + 真实渲染)。
This commit is contained in:
@@ -58,7 +58,7 @@ APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
||||
|
||||
Copyright 2026 laoyang
|
||||
Copyright 2026 The TripLog Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Reference in New Issue
Block a user