{% if DRYDOCK_ENABLE_SCORM and MINIO_HOST is defined %}
@scorm_matcher {
    path /scorm-proxy/*
}
route @scorm_matcher {
    uri replace /scorm-proxy/ /{{ MINIO_BUCKET_NAME }}/
    reverse_proxy minio:9000 {
        header_up Host {{ MINIO_HOST }}
    }
}
{% elif DRYDOCK_ENABLE_SCORM and S3_STORAGE_BUCKET is defined %}
@scorm_matcher {
    path /scorm-proxy/*
}
route @scorm_matcher {
    uri /scorm-proxy/* strip_prefix /scorm-proxy
    reverse_proxy https://{{ S3_STORAGE_BUCKET }}.{{ S3_HOST or 's3.amazonaws.com' }} {
        header_up Host {{ S3_STORAGE_BUCKET }}.{{ S3_HOST or 's3.amazonaws.com' }}
    }
}
{% endif %}
