DirectAdmin - Access to font from origin 'https://site.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Перейти к:навигация, поиск

DirectAdmin - Access to font from origin 'https://site.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource

Включить загрузку шрифтов с сайта для других доменов - нужно отредактировать конфиг nginx для домена через Administrator level в DirectAdmin -> custom-httpd configurations и добавить туда секцию:

location ~* \.(eot|ttf|woff|woff2)$ {
   add_header Access-Control-Allow-Origin *;
}