Actually.... let me try this myself too! What is your error message?
I'm not sure I understand your issue here. There is no specific configuration that I have seen for handling CORS in the PI Connector Relay or PI Data Collection Manager. What is the specific error message you received?
I am sending OMF data from devices on my home network to my PI Connector Relay instance running on an Azure VM. That VM has a CA issued certificate for my domain, and I have not had to configure any CORS related settings for the connector relay endpoint.
Are you using a valid producer token when sending the OMF data to the connector relay? What error message(s) are appearing in the relay message log?
The example file on GitHub even says....
NOTE: Make sure that you have both configured CORS (this example requires a CORS-enabled endpoint) and that you have trusted the SSL certificate.
The error I get in the browser is....
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 405.
CORS configuration is not available on the relay. This sample code only applies to the Edge Data Store which does support CORS configuration Configure Edge DS Cross-Origin Resource Sharing (CORS) — OSIsoft Qi documentation
I haven't tried this out, but it should be straighforward to write a small proxy server that supports CORS and will simply transmit the request from the browser to the relay.