Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to add custom header (WebGL/CORS) ?

Discussion in 'Multiplayer' started by SplashFoxGames, Aug 3, 2019.

  1. SplashFoxGames

    SplashFoxGames

    Joined:
    Oct 10, 2012
    Posts:
    53
    So let's say we have standard header like "Content-type", but what if I want to send custom header like "GAME_ID" using GET request ? I tried and seems got it working in Unity editor, but its not working in WebGL. I guess its something related to CORS, permissions and limitations.. Can you please give me any light on this?

    Edit: what about "cookie" header? is it possible to set it from game code/scripts?
    how to set web brower's cookie?
     
    Last edited: Aug 3, 2019