https://cerbos.dev logo
#help
Title
# help
r

Rafael Szuminski

06/17/2023, 11:43 PM
Hi All, I have run into an issue using js sdk on Firefox (but works perfectly fine with Chrome). Here is the setup: 1. Cerbos running in docker 2. Web app makes a request:
Copy code
const cerbos = new HTTP(`192.168.0.17:3592}`);
const result = await cerbos.checkResources({
        principal: principal,
        resources: resources
    });
Like I said, this works on Chrome but blows up on Fierfox with CORS Missing Allow Origin I tested default docker image and custom config where I specify CORS, both results are same
Copy code
---
server:
  httpListenAddr: ":3592"
  grpcListenAddr: ":3593"

engine:
  defaultPolicyVersion: "default"

auxData:
  jwt:
    disableVerification: true

storage:
  driver: "disk"
  disk:
    directory: "/policies"
    watchForChanges: true

cors: # CORS defines the CORS configuration for the server.
    allowedHeaders: ['content-type'] # AllowedHeaders is the contents of the allowed-headers header.
    allowedOrigins: ['*'] # AllowedOrigins is the contents of the allowed-origins header.
    disabled: false # Disabled sets whether CORS is disabled.
    maxAge: 10s # MaxAge is the max age of the CORS preflight check.
2 Views