Closed terry90 closed 7 years ago
@terry90 Test this against the latest npm
version, it should be fixed now.
Close the issue after or post what is happening.
You are incredibly reactive ! Thank you, I will close if fixed 👍
Woops, seems like headers.common
is not set.
Cannot read property 'Authorization' of undefined
@terry90 last commit should fix that undefined
issue.
Works like a charm
When setting:
axios.defaults.headers['Authorization']
in my app,Google maps api will refuse the preflight request:
Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response.
I changed my code to set the header in the post/get method and not in defaults.
I think it should be wise to create an instance of axios with no headers to reset the global config with the geocoder. like
instance = axios.create(); instance.defaults.headers = {}; instance.get....