Skip to content

Commit 60af836

Browse files
author
Taois
committed
fix:修复始终是localhost嗅探地址问题
1 parent f4aad8b commit 60af836

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

demo.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@ <h2>📄 页面源码获取</h2>
452452
</div>
453453

454454
<script>
455-
const API_BASE = 'http://localhost:57573';
455+
// 动态获取当前页面的协议、主机和端口作为API基础地址
456+
const API_BASE = `${window.location.protocol}//${window.location.host}`;
456457

457458
// 切换高级参数显示
458459
function toggleAdvanced(elementId) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pup-sniffer",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Video resource sniffer using Puppeteer and Fastify",
55
"main": "server.cjs",
66
"bin": "server.cjs",

0 commit comments

Comments
 (0)