【发布时间】:2026-01-25 03:40:01
【问题描述】:
我在 Amazon S3 上有一个存储桶。在桶里我有这个:
assets/css/bootstrap.css
assets/fonts/glyphicons-halflings-regular.woff2
assets/fonts/glyphicons-halflings-regular.woff
assets/fonts/glyphicons-halflings-regular.ttf
正如引导程序documentation 所建议的那样。但是我在我的网站上看不到字形图标,而是在控制台上收到此错误:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://bootstrapvitality.s3.amazonaws.com/assets/fonts/glyphicons-halflings-regular.ttf. (Reason: CORS header 'Access-Control-Allow-Origin' missing). <unknown>
downloadable font: download failed (font-family: "Glyphicons Halflings" style:normal weight:normal stretch:normal src index:3): bad URI or cross-site access not allowed source: https://bootstrapvitality.s3.amazonaws.com/assets/fonts/glyphicons-halflings-regular.ttf
对于每个 glyphicon 文件。 我该如何解决这个问题?
【问题讨论】: