搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Problems with Firefox Quantum with Netlify [SOLVED]

more options

macOS 10.13.1 High Sierra

Firefox Quantum 57

Hello, I have a website that is hosted at Netlify. The URL is `https://relaxed-williams-d8a311.netlify.com/` I have the domain `https://carlca.com` which is configured to point to the same site. The problem is that while the site displays perfectly from the `https://relaxed-williams-d8a311.netlify.com/` URL, some of the characters do not display properly with the `https://carlca.com URL` and they are pointing to the same site, Look at the social media symbols as examples of this difference in the display.

I received a message from elsewhere that suggested:

"This is due to the fact that the font can't be loaded due to an issue with CORS:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://relaxed-williams-d8a311.netlify.com/fonts/fontawesome-webfont.woff2?v=4.6.3. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). You can read more about CORS here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS"

While its great that someone has identified the origin of the issue, what's not so great is that there is no identifiable course of action that would enable me to get the font working.

Both URLs display correctly in Chrome...

macOS 10.13.1 High Sierra Firefox Quantum 57 Hello, I have a website that is hosted at Netlify. The URL is `https://relaxed-williams-d8a311.netlify.com/` I have the domain `https://carlca.com` which is configured to point to the same site. The problem is that while the site displays perfectly from the `https://relaxed-williams-d8a311.netlify.com/` URL, some of the characters do not display properly with the `https://carlca.com URL` and they are pointing to the same site, Look at the social media symbols as examples of this difference in the display. I received a message from elsewhere that suggested: "This is due to the fact that the font can't be loaded due to an issue with CORS: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://relaxed-williams-d8a311.netlify.com/fonts/fontawesome-webfont.woff2?v=4.6.3. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). You can read more about CORS here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS" While its great that someone has identified the origin of the issue, what's not so great is that there is no identifiable course of action that would enable me to get the font working. Both URLs display correctly in Chrome...

由 carlcaulkett 於 修改

被選擇的解決方法

The problem is solved. The Hugo website has a `config.toml` which takes a `baseurl` parameter. Pointing that URL to either of the fully qualified URL paths messes up the font display in the other. By simply setting the `baseurl` parameter to "/" caused the fonts to display correctly regardless of which site URL is being used.

從原來的回覆中察看解決方案 👍 0

所有回覆 (1)

more options

選擇的解決方法

The problem is solved. The Hugo website has a `config.toml` which takes a `baseurl` parameter. Pointing that URL to either of the fully qualified URL paths messes up the font display in the other. By simply setting the `baseurl` parameter to "/" caused the fonts to display correctly regardless of which site URL is being used.