从错误信息来看,这是一个典型的跨域(CORS)问题。错误显示访问 http://localhost:3000/api/match_summary 时被CORS策略阻止,因为 'Access-Control-Allow-Origin' header 的值 http://localhost:8080 与实际源 https://sp.ifballs.com 不匹配。
切换到国内的 npm 源可以提高依赖安装的速度,特别是在国内网络环境下常使用 npm
或 yarn
时。以下是切换 npm 源的常用方法:
bash-------------------------------------------------------- ./nezha.sh - 显示管理菜单 ./nezha.sh install_dashboard - 安装面板端 ./nezha.sh modify_dashboard_config - 修改面板配置 ./nezha.sh start_dashboard - 启动面板 ./nezha.sh stop_dashboard - 停止面板 ./nezha.sh restart_and_update - 重启并更新面板 ./nezha.sh show_dashboard_log - 查看面板日志 ./nezha.sh uninstall_dashboard - 卸载管理面板 -------------------------------------------------------- ./nezha.sh install_agent - 安装监控Agent ./nezha.sh modify_agent_config - 修改Agent配置 ./nezha.sh show_agent_log - 查看Agent日志 ./nezha.sh uninstall_agent - 卸载Agen ./nezha.sh restart_agent - 重启Agen ./nezha.sh update_script - 更新脚本 --------------------------------------------------------