forwardemail / forwardemail/superagent

Custom Request Header Not Set Properly

Open
#923 2 comments 3 reactions 0 assignees View on GitHub
Browser
Dominant language
JavaScript
Stars
16.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

When i am setting the header in the post request the headers are not set properly

Request is
var req = superagent
.post(url)
.set('Access-Control-Allow-Credentials', 'true')
.set('Access-Control-Expose-Headers', 'X-Test-2, X-Test-1')
.set('Access-Control-Allow-Origin', 'http://localhost')
.withCredentials()
.send(data)
.accept('json')
.type('json')
.end(cb);
the actual request in the browser is having Access-Control-Request-Headers set with
"access-control-allow-credentials access-control-expose-headers etc..."

The header are not setting correctly hence. There is a post but there is no answer to it.
https://github.com/visionmedia/superagent/issues/666

Please help me with this . Am i doing something wrong?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.