Hi,
I have a test project hosted on the App Platform combined with Spaces. All static files hosted there work just fine with one exception: fonts.
When I load the page I get the following error in console: net::ERR_ABORTED 403
.
My file structure is as follows:
PROJECT
-app
-app
--templates
--static
---static/CSS -> .css file
---static/fonts -> font files
In my css the font files are loaded as follows:
@font-face {
font-family: 'poppins-bold';
src: url('/static/fonts/Poppins-SemiBold.woff2') format('woff2');
}
I tried to set **CORS **in my spaces settings with the following origin: https://*.ondigitalocean.app
and GET as method.
What am I doing wrong or missing? This works perfectly fine in development, just not in production.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
After setting the allowed origin to
https://*.ondigitalocean.app
and the allowed MethodsGET
, did you also add a Allowed Header? If not, you can do so and specify*
as the value.Let me know how it goes!
Best,
Bobby