Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

WebGL publisher CORS webrequest problems

Discussion in 'WebGL' started by Risine, Apr 11, 2022.

  1. Risine

    Risine

    Joined:
    Dec 10, 2009
    Posts:
    154
    Hello,
    I've built a Unity WebGL app that is running correctly on localhost after dealing with WebRequest Cors problems.
    I've tried to publish the WebgL app on unity share, but I have CORS pbs again on Unity share server.
    Does someone know how to fix that?
    Thanks
     
  2. OceanX000

    OceanX000

    Joined:
    Feb 24, 2021
    Posts:
    120
    Append these settings in your HTTP response headers:
    "Access-Control-Allow-Credentials": "true",
    "Access-Control-Allow-Headers": "Accept, X-Access-Token,
    X-Application-Name, > X-Request-Sent-Time",
    "Access-Control-Allow-Methods": "GET, POST, OPTIONS",
    "Access-Control-Allow-Origin": "*",
     
  3. Risine

    Risine

    Joined:
    Dec 10, 2009
    Posts:
    154
    I'll give it a try thanks.