Closed perljusback closed 5 years ago
Good evening,
First great initiative i've been wanting to remove axios in favor for fetch for awhile now and this finaly got me to do it.
I noticed this error yesterday and figured i'd try and help with what i can.
Best Regards Per Anders Ljusbäck
Hi @perljusback why did you closed the PR?
I think defaults.headers
is missing here: https://github.com/nuxt/http/blob/dev/lib/plugin.js#L97
Sorry easter break... I'll resubmit if you want it.
The reason I moved it to a seperate condition in the build for process.server instead of adding it directly to the defaults object was to not set it twice, if the proxyHeader is present.
This causes duplicate code. I suggest just adding default (empty object) for headers
Ok updated, thanks for the input
Thanks. Fixed in 0.1.1.
When proxyHeaders is false trying to overwrite the object fails, added a conditional check on build to see if it exists or not.