How To Append Custom Headers To Axios Request? #1744 - GitHub

Skip to content Dismiss alert {{ message }} / axios Public
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Notifications You must be signed in to change notification settings
  • Fork 11.5k
  • Star 108k
  • Code
  • Issues 200
  • Pull requests 133
  • Discussions
  • Actions
  • Security

    Uh oh!

    There was an error while loading. Please reload this page.

  • Insights
Additional navigation options How to append custom headers to axios request? #1744New issueNew issueClosedClosedHow to append custom headers to axios request?#1744@ksairamya

Description

@ksairamyaksairamyaopened on Aug 20, 2018

I want to add a custom header x-dsi-restful to a get request. But I'm unable to append it through axios. Here is what I did getAppSettings().localRetailVehicleComparablesUrl }/k6MRDHbipIsp4BiKcNm66w/local_retail/comparables`, { method: 'get', withCredentials: true, headers: { 'Content-Type': 'application/json; charset=utf-8', 'x-dsi-restful': 1 }

Even though I added it to Header set Access-Control-Allow-Headers "x-dsi-restful, Authorization" I'm unable to append it to the request.

Only if I hardcode the value in apache conf the its working. Like RequestHeader append x-dsi-restful "1"

Is there a way to append it from axios?

Metadata

Metadata

Assignees

No one assigned

Labels

No labelsNo labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You can’t perform that action at this time.

Tag » Add Custom Headers In Axios