Access to external resource blocked by CORS policy
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- backend
调研方向
Reproduce the prerender request that triggers the CORS preflight, using the Google Fonts URL and the Contentful-backed page described in the report. Compare localhost and production behavior, then establish whether external resources can load during prerendering; done means the behavior is fixed or its production limitation is clearly documented.
由索引模型根据 Issue 内容生成。
描述
When trying to test prerender I get a failure with the following error:
019-08-26T11:15:21.130Z { source: 'javascript',
level: 'error',
text:
'Access to font at \'https://fonts.gstatic.com/s/montserrat/v14/JTURjIg1_i6t8kCHKm45_cJD3gnD_vx3rCs.woff2\' from origin \'http://localhost:2200\' has been blocked by CORS policy: Request header field x-prerender is not allowed by Access-Control-Allow-Headers in preflight response.',
timestamp: 1566818121129.915,
url: 'http://localhost:2200/experience/play' }
2019-08-26T11:15:21.131Z - 0 https://fonts.gstatic.com/s/montserrat/v14/JTURjIg1_i6t8kCHKm45_cJD3gnD_vx3rCs.woff2
2019-08-26T11:15:21.131Z { source: 'network',
level: 'error',
text: 'Failed to load resource: net::ERR_FAILED',
timestamp: 1566818121130.127,
url:
'https://fonts.gstatic.com/s/montserrat/v14/JTURjIg1_i6t8kCHKm45_cJD3gnD_vx3rCs.woff2',
networkRequestId: '1000027665.19' }
Google fonts isn't mission critical for render, however I am also loading content dynamically from a CMS (https://contentful.com) that is. Metadata and all content is loaded here. If the policy can't be bypassed then prerender is effectively useless for my use case. I'm not an expert on CORS here, if this is only an issue for localhost then this may not be a problem, however if the same thing would happen on production then it would be a problem.
Any recommendations?
- 主要语言
- JavaScript
- 星标
- 921
- 派生
- 185
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
prerender/prerender-node 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
prerender/prerender-node#274 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 48/100
prerender/prerender-node#272 ·
-
Fastify support? 未关闭
难度 5/5 一周以上 新手友好度 15/100
prerender/prerender-node#224 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 45/100
prerender/prerender-node#223 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
prerender/prerender-node#220 · 2 条评论 · 2 个 reaction ·
查看 prerender/prerender-node 的全部 Issue
相似的 Issue
-
ai-observability bug team/ai-observability
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 68/100
AllTheMods/ATM-10-L#19 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
SignalK/n2k-signalk#345 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 1/5 1-3 小时 新手友好度 88/100
JuliaPluto/PlutoPlotly.jl#72 ·