superagent icon indicating copy to clipboard operation
superagent copied to clipboard

Feature request: set origin

Open goldylucks opened this issue 3 years ago • 0 comments

would be awesome to cover allowed origins, i.e.:

// app.js
app.get('/', cors({
  origin: "http://allowed.com"
}), (req, res) => {
  res.sendStatus(200)
})

// app.spec.js
const resp = await request(app).post('/').origin('http://allowed.com')
expect(resp.status).toStrictEqual(200)

goldylucks avatar Mar 19 '22 11:03 goldylucks