Skip to content

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Dec 10, 2020

There is a breaking change with axios axios/[email protected] that when passing headers config when calling axios, it discards defaults.headers.common (used for both config and setHeader utility.

resolves #411

Update: Axios regression found by @1ed regarding defaults overriding: axios/axios#2844 <3


Test flow for #411:

  • /api/cookie endpoint that simply returns value of mycookie header if set
  • Make a random string in client-side and set cookie "mycookie"
  • Make SSR request
    • SSR request makes a call to /api/cookie in asyncData using $axios to check what headers are passed to API when using axios in server side
  • Value is checked against initial random one (and passing)

Locally trying:

@pi0 pi0 changed the title fix: try to fix #411 fix: preserve default headers with custom headers Dec 14, 2020
@codecov
Copy link

codecov bot commented Dec 14, 2020

Codecov Report

Merging #452 (97c477f) into master (bec998c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #452   +/-   ##
=======================================
  Coverage   95.55%   95.55%           
=======================================
  Files           1        1           
  Lines          45       45           
  Branches       25       25           
=======================================
  Hits           43       43           
  Misses          2        2           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bec998c...97c477f. Read the comment docs.

@pi0 pi0 marked this pull request as ready for review December 14, 2020 11:54
@pi0 pi0 merged commit 55f994f into master Dec 14, 2020
@pi0 pi0 deleted the fix/411 branch December 14, 2020 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken server side request with cookies in 5.12.2

3 participants