Buddycreative Posted February 17 Share Posted February 17 Hey team! Having an issue with CORS blocking a custom font on our deployed page. The font displays perfectly in preview/edit modes (navbar, headings and buttons). However, on the deployed page were getting these errors: www.buddycreative.com.au/:1 Access to font at 'https://static1.squarespace.com/static/64d45d3380d2950c5ad0d949/t/65c0b64d2fa0a6617b387154/1707128397244/Acorn-Medium.otf' from origin 'https://www.buddycreative.com.au' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. site.css:1 GET https://static1.squarespace.com/static/64d45d3380d2950c5ad0d949/t/65c0b64d2fa0a6617b387154/1707128397244/Acorn-Medium.otf net::ERR_FAILED 404 (Not Found) Would love some input if possible! I had a look into trying to configure CDN settings to resolve the issue but no luck - Squarespace is pretty new territory for me. Here's the custom CSS at current: /* Define custom font */ @font-face { font-family: 'Acorn-Medium'; src: url('https://static1.squarespace.com/static/64d45d3380d2950c5ad0d949/t/65c0b64d2fa0a6617b387154/1707128397244/Acorn-Medium.otf'); } /* Apply custom font to heading elements */ h1, h2, h3, h4 { font-family: 'Acorn-Medium' !important; overflow-x: hidden; /* Add a valid value for overflow-x, like 'hidden' or 'scroll' */ } /* Apply custom font to navigation links */ .header-nav a { font-family: 'Acorn-Medium', sans-serif !important; font-size: 20px; } body .sqs-block-button-element { font-family: 'Acorn-Medium', sans-serif !important; } /* Gallery grid styles */ .gallery-grid-wrapper { display: flex; animation: slideshow 30s linear infinite; } .gallery-grid-wrapper .gallery-grid-item { min-width: 50%; margin-right: 5%; } /* Keyframes for gallery grid slideshow animation */ @keyframes slideshow { 0% { left: 0; } 100% { left: -225%; } Cheers all! Link to comment
Solution paul2009 Posted February 17 Solution Share Posted February 17 (edited) 31 minutes ago, Buddycreative said: Having an issue with CORS blocking a custom font on our deployed page...ERR_FAILED 404 (Not Found) @Buddycreative There appears to be an issue with the font file URL. Did you add the font file manually on this site, or are you using a URL from another site? For example, is this a duplicate of another site? I recommend that you upload the font file again manually and then replace the URL and see if this resolves the issue. Did this help? Please give feedback by clicking an icon below ⬇️ Edited February 17 by paul2009 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
Buddycreative Posted February 17 Author Share Posted February 17 Perfect! Thanks so much for your help Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment