How to fix error when using .woff and .woff2 extensions?

Description description

Environment

Adobe Campaign Classic v7 (Release 7.2.2 - Build 9349)

Issue/Symptoms

After you whitelist .woff and .woff2 on a mid instance, and use these file extensions in a web app, the following error is thrown:

Access to font at 'https://mkt-instance.campaign.adobe.com/res/mid-instance/file_example.woff2'
    from origin 'https://mkt-instance.campaign.adobe.com' has been blocked by
    CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Steps to reproduce:

  1. Access the URL of the web app using .woff and .woff2 files.
  2. Open the browser console of your web browser, and notice the error for these files.

Resolution resolution

  1. Add Access-Control-Allow-Origin, Access-Control-Allow-Headers, and Access-Control-Allow-Methods as responseHeader under the relay section of the serverConf.xml:
  2. Add Access-Control-Allow-Origin, Access-Control-Allow-Headers, and Access-Control-Allow-Methods headers on apache_neolane.conf on both app containers:
  3. Once the two files have been saved, do a clean nlserver and apache restart on all containers of the instance.

Cause

The error is thrown because the mid instance was missing the configuration of Access-Control-Allow-Origin, Access-Control-Allow-Headers, and Access-Control-Allow-Methods headers on serverConf.xml and on apache_neolane.conf.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f