White-listing WebSocket endpoints in `openai/widgetCSP`

Is it possible to white-list WebSocket endpoints under the openai/widgetCSP settings? The following approach doesn’t seem to be working as the wss://… endpoint is automatically prefixed with https://:

DOMAINS = [
  "https://cdn.derivative.autodesk.com",
  "wss://cdn.derivative.autodesk.com"
];

server.registerResource({
  "viewer",
  "ui://widget/viewer.html",
  {},
  async () => {
    return {
      contents: [{
        uri: "ui://widget/viewer.html",
        mimeType: "text/html",
        text: VIEWER_HTML,
        _meta: {
          "openai/widgetCSP": {
            connect_domains: DOMAINS,
            resource_domains: DOMAINS
          }
        }
      }]
    };
  }
});

Hey, were you able to get an answer for this?

Unfortunately not. And I’m seeing more and more folks running into the same issue.

1 Like

I’m asking myself a similar question. The current architecture where the frontend interacts with the server through MCP doesn’t seem ideal for building a fully functional app. I mean not just a showcase app, but a real in-chat application with full functionality. For example, I don’t understand why Zillow’s example doesn’t let you change filters within the app that feels like a basic feature. Why should I have to make an extra request and reopen the app just because I changed the search criteria? :man_shrugging: