Export links and the webcal feed 404 under npm run dev
维护者通常 7 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 83/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, nginx, node.js
调研方向
阅读 app/facade.js,并将其开发路由与 services/nginx/conf.d/shift.conf 中的别名进行比较。追踪 issue 中提到的 exportable 字段和 API_ICS_URL 引用,以确认所请求的路径。在开发 facade 中添加这两个映射,然后验证在运行 npm run dev 时,这两个 URL 返回的响应都与 /api/ical.php 相同。
由索引模型根据 Issue 内容生成。
描述
Under npm run dev, every event's Export link returns 404, in both the Vue calendar and the Hugo theme. The all-events webcal feed does too.
/api/ics.php?event_id=11 -> 404 (what Export links to)
/api/ical.php?event_id=11 -> 200 (the real endpoint)
/api/shift-calendar.php -> 404 (the webcal feed)
Cause
There's no ics.php or shift-calendar.php endpoint in app/. nginx serves ical.php under both names:
# services/nginx/conf.d/shift.conf
location = /api/ics.php { proxy_pass http://node:3080/api/ical.php; }
location = /api/shift-calendar.php { proxy_pass http://node:3080/api/ical.php; }
and the API's exportable field (calDaily.getExportable()) and the Vue app's API_ICS_URL both point at ics.php. So production and the Docker setup work, but node dev has no nginx, and app/facade.js — which stands in for nginx there — doesn't map either name.
Production is unaffected. The cost is that ICS changes can't be checked end to end from the Export link without switching to Docker.
Fix
Mirror the two nginx aliases in facade.js, which only runs under npm run dev.
- 主要语言
- JavaScript
- 星标
- 30
- 派生
- 26
- 平均合并
- 6 天 24 分钟
- 30 天内合并 PR
- 6
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
shift-org/shift-docs 的其他 Issue
-
Unknown --db values report a TypeError instead of the intended error可能已有人在做 @gangster 于 76 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
shift-org/shift-docs#1091 ·
维护者通常 7 天内回复
-
validateRideLength accepts any Object.prototype key as a ride length可能已有人在做 @gangster 于 76 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
shift-org/shift-docs#1089 ·
维护者通常 7 天内回复
-
Favorites page fetches every favorite because getDaily's guard is inverted可能已有人在做 @gangster 于 76 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
shift-org/shift-docs#1087 ·
维护者通常 7 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
shift-org/shift-docs#1126 ·
维护者通常 7 天内回复
-
Address npm audit vulnerabilities (nodemailer, multer, express deps)可能已有人在做 @gangster 于 5 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
shift-org/shift-docs#1118 · 1 条评论 ·
维护者通常 7 天内回复
查看 shift-org/shift-docs 的全部 Issue
相似的 Issue
-
release-followup
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
area: right sidebar
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
cleanup
难度 2/5 1-3 小时 新手友好度 65/100
uclaacm/membership-portal-ui#409 ·
维护者通常 1 天内回复