сайт псевдонима wordpress, показывающий проблемы CORS в ссылках на шрифты Divi - PullRequest
0 голосов
/ 07 августа 2020

Один из клиентов создал WordPress и его псевдоним. Псевдоним WordPress должен работать так же, но он показывает проблемы с CORS, и, следовательно, CSS полностью исчез.

Я пробовал эти решения allow-origin-header & header контроль доступа , но у меня ничего не работает. Я попытался добавить этот заголовок, чтобы исправить проблему:

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>

Не работает. Также попробовал добавить эти заголовки

<FilesMatch "\.(ttf|otf|eot|woff|woff2)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
  </IfModule>
</FilesMatch>

Ни один из них не работает.

Вот веб-сайты heritagetile.com (оригинал) и псевдоним subwaytile.com. Все предложения приветствуются !!

Вот ошибки скрипта, которые я получаю в консоли браузера. Обратите внимание, что я заменил имена веб-сайтов для ограничения поисковых роботов heritagetile.com заменено на my-website1.com и subwaytile.com заменено на my-alias-website.com.

 Failed to load resource: the server responded with a status of 404 ()
    my-website1.com/wp-content/cache/min/1/wp-content/themes/Divi/style-c491840c2cac5dc5d9edbac01815a6c7.css:1 Failed to load resource: the server responded with a status of 404 ()
    (index):1 
    Uncaught (in promise) null
    my-website1.com/wp-content/et-cache/136/et-core-unified-136-15965402740641.min.css:1 
    Failed to load resource: the server responded with a status of 404 ()
    my-website1.com/wp-content/et-cache/136/et-core-unified-tb-929-tb-21-136-1596562693321.min.css:1 
    Failed to load resource: the server responded with a status of 404 ()
    /wp-content/themes/heritage-tile/core/admin/fonts/modules.woff:1 
    Failed to load resource: the server responded with a status of 404 ()
    (index):1 
    Access to font at 'https://my-website1.com/wp-content/themes/Divi/core/admin/fonts/modules.ttf' from origin 'https://my-alias-website.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    my-website1.com/wp-content/themes/Divi/core/admin/fonts/modules.ttf:1 
    Failed to load resource: net::ERR_FAILED
    (index):1 
    Access to font at 'https://my-website1.com/wp-content/themes/Divi/core/admin/fonts/modules.woff' from origin 'https://my-alias-website.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    my-website1.com/wp-content/themes/Divi/core/admin/fonts/modules.woff:1 
    Failed to load resource: net::ERR_FAILED
    /?et_core_page_resource=et-core-unified-136-cached-inline-styles136:1 Failed to load resource: the server responded with a status of 404 ()
    /?et_core_page_resource=et-core-unified-tb-929-tb-21-136-cached-inline-styles136:1 Failed to load resource: the server responded with a status of 404 ()
    (index):1 
    Access to font at 'https://my-website1.com/wp-content/themes/Divi/core/admin/fonts/modules.ttf' from origin 'https://my-alias-website.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    (index):1 
    GET https://my-website1.com/wp-content/themes/Divi/core/admin/fonts/modules.ttf net::ERR_FAILED
    (index):1 
    Access to font at 'https://my-website1.com/wp-content/themes/Divi/core/admin/fonts/modules.woff' from origin 'https://my-alias-website.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    (index):1 
    GET https://my-website1.com/wp-content/themes/Divi/core/admin/fonts/modules.woff net::ERR_FAILED
    (index):215 
    GET https://my-website1.com/wp-content/et-cache/136/et-core-unified-tb-929-tb-21-136-1596562693321.min.css net::ERR_ABORTED 404
    (index):121 
    GET https://my-website1.com/wp-content/cache/min/1/wp-content/themes/Divi/style-c491840c2cac5dc5d9edbac01815a6c7.css net::ERR_ABORTED 404
    (index):215 
    GET https://my-website1.com/wp-content/et-cache/136/et-core-unified-136-15965402740641.min.css net::ERR_ABORTED 404
    (index):12 
    GET https://my-alias-website.com/?et_core_page_resource=et-core-unified-tb-929-tb-21-136-cached-inline-styles136 net::ERR_ABORTED 404
    et_core_page_resource_fallback @ (index):12
    onerror @ (index):215
    (index):1 
    Uncaught (in promise) null
    (index):12 
    GET https://my-alias-website.com/?et_core_page_resource=et-core-unified-136-cached-inline-styles136 404
    et_core_page_resource_fallback @ (index):12
    onerror @ (index):215
    2style.css:1 
    GET https://my-alias-website.com/wp-content/themes/heritage-tile/core/admin/fonts/modules.ttf net::ERR_ABORTED 404

Все предложения приветствуются!

...