CORS Issues with Kit 106 USD Viewer Template and Kubernetes Deployment

Problem:

I’m developing an application using the Kit 106 USD Viewer template from the NVIDIA Omniverse GitHub repository. My goal is to deploy the React web client to Kubernetes and run the Kit 106 streaming app on a separate VM. The web client ingress utilizes HTTPS, which I cannot change.

After successfully deploying the application, I encountered the following issues:

  1. Mixed Content Error: Initially, the web client experienced a mixed content error due to the insecure WebSocket connection. I resolved this by implementing Nginx to proxy HTTPS traffic.
  2. CORS Errors: Despite resolving the mixed content issue, CORS errors are now preventing proper communication between the web client and the Kit app.

Attempted Solutions:

I’ve implemented the following CORS configuration in my app toml file, based on the recommendations from the NVIDIA developer forums:

Plain Text

[settings.exts."omni.services.transport.server.http"]
https.enabled = truehttps.port = 443  # Or another port of your choice
ssl.ssl_keyfile = "# Path to your SSL private key"ssl.ssl_certfile = "
# Path to your SSL certificate"ssl.ssl_version = "
TLSv1_2"  # Specify the SSL version
cors.enabled = truecors.allow_origins = ['*']
cors.allow_credentials = false
cors.allow_methods = ['*']
cors.allow_headers = ['*']

However, these configurations have not resolved the CORS errors.

Am I missing additional configuration and is there anything I’m missing that needs to be implemented ?

Could you please detail your setup and list streaming extensions you’re trying to use currently?
Also please note that NVIDIA has released Omniverse application streaming (OVAS) sample artifacts, that you can use as a blueprint and starting point to develop your own Omniverse streaming infrastructure. It’s running on Kubernetes and managed by means of Helm, which seems to match your target environment.

I’m linking the OVAS docs so you get started: Overview — Kit App Streaming API

Hey @alexanderku, thanks for getting back to me.

I’m just running the sample USD Viewer extension in the documentation:

Ok, this uses omni.kit.livestream.webrtc extension which is exactly what OVAS uses too. Do you use OVAS sample already? If not, how do you run a Kit app on Kubernetes?

@alexanderku , I’m only running the react front-end client on kubernetes, the kit app is run on a separate VM.

Same issue, this git sample doesn’t seem to be cross-domain, I had to hire a network architect to try and deploy the full project on K8S, but it hasn’t worked so far

Ok this comes up a lot. Please note that our Kit Streaming technology is NOT DESIGNED to cross network domains. Not unless you have a very custom network that gets around a lot of the cross network issues and CORS. The streaming kit samples are designed for LOCAL NETWORKS only. You cannot have a front end on one VM and the kit app on another. Not unless you configure both of those VMs to be in the “same local network”. These streaming “samples” are designed for you to take and write your own custom versions for custom networks. But again, the samples are really designed to go from your local kit app to your local browser and that’s it.