so we wanted to add some new Fonts in our templates, but we couldn't, after some research we found that we need to enable CORS in our servers.
We have IIS servrer, so we looked into this documentation : https://enable-cors.org/server_iis7.html , but we couldn't find the web.config file.
The question here is where we can find that file inside the server? And if there isn't and we wanna create it, where exactly we can put the file ? Or if we can enable it using other way ?
IIS uses the dir the site is being hosted out of for its web.config, akin to Apache's .htaccess file.
For your site, look at the url your fonts are hosted out of, then follow the same path in Windows Explorer; e.g. for http://example.com/res/fonts, the root is the parent of the res\fonts dir.
Hi Jon and thanks for your answer,
The problem here is that I can't upload fonts to the delivery, shows me that error :
After i searched for that, I found a similar post that have more or less the same problem, where your answer was to enable CORS :
I just wanna try to enable CORS to see if that the main problem, if it is, how i can enable CORS ?
If not, how i can upload fonts to a delivery template in adobe campaign classic ?
From the screenshot above, seems like the font that you have uploaded, delivery is considering as an image. It should be font type and in Adobe campaign it will be considered as 'Other type' in file resources. As Manoj told, you can do following:
Then take the URL from public file resource and use in webapps. This works for us.
Note: For email, custom fonts might not work. Hope you know the limitations of email rendering in different email clients.
Did you try opening that font url directly in the browser? If the url is not loading for more than 20 minutes then there is a possibility that the DNS is not resolving.
And if the page is still loading then the CORS issue is solved, because the browser will immediately block the url request if the domain is not authorized for any request.