Navigation

    Colyseus
    • Login
    • Search
    • Recent
    • Tags
    • Users
    1. Home
    2. Wenish
    3. Best
    • Profile
    • More
      • Continue chat with Wenish
      • Flag Profile
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups

    Best posts made by Wenish

    RE: Set Authorization headers for backend requests(solved)

    Hey probably kinda depends on the specific setup you have.
    But in the room in the "onAuth()" callback you can access the header via the request object you get.
    so on client side set the header with your accessToken
    https://docs.colyseus.io/colyseus/server/room/#onauth-client-options-request

    then for /matchmake or sessions endpoints i would add a express middleware
    https://expressjs.com/en/guide/using-middleware.html

    this would work if you use the express setup for the colyseus server:
    https://docs.colyseus.io/colyseus/server/api/#optionsserver

    also you have have to set on client side the header with some sort of intercepter
    this doc helps if you develop you client for the web:
    https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest

    posted in Questions & Help •
    RE: Is Colyseus what I'm looking for?

    Hey @Tobi4s1337

    What you describe is possible with colyseus and colyseus will definitely take some work away.
    And you understood colyseus right. the features u want from colyseus are all supportedö.

    Since you think a client would be a cool idea and u already know vue this one would be super good for you:
    https://github.com/SimulatedGREG/electron-vue

    posted in Questions & Help •
    RE: Set Authorization headers for backend requests(solved)

    true i sent a link to add-ons. i meant to sent a link for service workers
    https://stackoverflow.com/questions/43813770/how-to-intercept-all-http-requests-including-form-submits#:~:text=js file (the actual service,function(event) { event.

    posted in Questions & Help •