Welcome to the Panopto Community

Please note: All new registrants to the Panopto Community Forum must be approved by a forum moderator or admin. As such, if you navigate to a feature that is members-only, you may receive an error page if your registration has not yet been approved. We apologize for any inconvenience and are approving new members as quickly as possible.

Can't get past CORS error

I'm trying to upload a video with javascript calls to the REST API and I can't get past the cross-origin error, I'm guessing because the access token doesn't get transmitted with the OPTIONS preflight check. What am I doing wrong?

I've tried setting up three different API clients, one server-side, one Javascript, and one hybrid. I can get OAuth tokens without a problem, and the server-side client can call the REST API, but the Javascript and hybrid clients fail with the cross-origin error every time. Everything seems to be set up properly according to the documentation, and my Jquery AJAX call is pretty basic.

Here's the hybrid client:

And I'm attaching the Jquery code, along with the request and response headers for the OPTIONS call that fails.

Is there something simple that I'm missing? Any help is greatly appreciated.

Tagged:

Answers

  • Kevin BaumKevin Baum Panopto Employee

    Hi Will,

    There is a setting that one of your Panopto administrators should be able to access to add additional allowed cross-origin request domains. The setting is under System->Settings->Security - API - Allowed API Origins. This should be a list of domains that are allowed to make cross-origin calls from a browser to the Panopto API, with each domain separated by a space.

    Can you have one of your Panopto admins add your testing domain to this setting, and see if that fixes the CORS error?

    If this does not resolve the issue, or if you have any other questions, please let me know.

    Thanks,

    Kevin

Sign In or Register to comment.