Jump to content
McKay Development
Pixel

Cookies are not passed with request

Recommended Posts

webSession event is fired and client is logged in, but when making http GET requests the cookie headers are not included on production (but works locally). Is it possible to manually include those / force them to be included?

Production Request Headers:

"headers": {
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
  "accept-encoding": "gzip, deflate"
}

Local Request Headers:

"headers": {
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
  "accept-encoding": "gzip, deflate",
  "referer": "https://api.rollbit.com/auth",
  "cookie": "Steam_Language=english; timezoneOffset=0,0; sessionid=123; steamLogin=123; steamLoginSecure=123"
}

 

client.on('webSession', (sessionID, cookies) => {
    console.log('Logged on');
    community.setCookies(cookies);
    
    loadCookies()
})

function loadCookies() {
  var options = {
    url: url,
    method: 'GET',
    followAllRedirects: true
  }

  community.httpRequest(options, (err, response, body) => {})
}

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...