Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

remove duplicate header key #216

Merged
merged 1 commit into from
May 24, 2021
Merged

Conversation

kminhc
Copy link
Contributor

@kminhc kminhc commented May 21, 2021

Fixes #215

@strapi-cla
Copy link

strapi-cla commented May 21, 2021

CLA assistant check
All committers have signed the CLA.

@remidej
Copy link
Contributor

remidej commented May 21, 2021

It looks like the problem still occurs for me, even with your change

@kminhc
Copy link
Contributor Author

kminhc commented May 21, 2021

This seems strange. On my end this exact change makes it work, because the requestOptions then looks like this

{
  "method": "GET",
  "url": "https://example.com/articles",
  "params": {
    "_limit": 1000
  },
  "headers": {
    "Authorization": "Bearer TOKEN"
  }
}

which should be correct according to axios documentation

instead of

{
  "method": "GET",
  "url": "https://example.com/articles",
  "params": {
    "_limit": 1000
  },
  "headers": {
    "header": {
      "Authorization": "Bearer TOKEN"
    }
  }
}

@raphacamilo
Copy link

This fix works well for me.

Copy link
Contributor

@remidej remidej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your responses. I double checked and the problem was coming from my environment, so my bad!

The change looks good and fixes the problem. I'm not sure what caused the problem in this specific release though. But it seems ready to merge @alexandrebodin 🙂

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authentication to collectionTypes/singleTypes endpoints fail after successful request to /auth/local
5 participants