<IfDefine !MODULES_PATH>
    Define MODULES_PATH lib/apache2/modules
</IfDefine>

LoadModule cors_module ${MODULES_PATH}/mod_cors.so

# CORS settings

CorsProtection On

<IfDefine CORS_ENABLED>
    Cors On
    CorsAllowCredentials On
    CorsAllowHeader Authorization Content-Type X-NI-Auth-Method
    CorsAllowMethod GET HEAD OPTIONS POST PUT DELETE PATCH
    # CorsExposeHeader
    # CorsMaxAge Off
    CorsTrustedOrigin ${CORS_TRUSTED_ORIGINS}
</IfDefine>
