https://cerbos.dev logo
Title
d

Dipesh Bajgain

03/24/2023, 5:42 AM
Hey everyone, I have setup cerbos in my local machine using docker-compose as mentioned in above message and while trying to connect to cerbos using the js sdk I am getting cors error as
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at <http://localhost:3592/api/check/resources>. (Reason: CORS request did not succeed). Status code: (null).
And my updated config file is as below:
---
storage:
  driver: "disk"
  disk:
    directory: /policies
    watchForChanges: true

server:
  playgroundEnabled: true
  httpListenAddr: ":3592"
  grpcListenAddr: ":3593"
  cors:
    allowedHeaders: ['content-type'] 
    allowedOrigins: ['*']
    disabled: false
    maxAge: 10s
d

Dennis (Cerbos)

03/24/2023, 7:13 AM
Please check this thread.