Is there a reason our standard cors support and the cors_origins site setting is not working for you?
cors_origins