mirror of
https://github.com/bastienwirtz/homer.git
synced 2024-11-07 08:44:00 +01:00
fix: empty / null headers issue
This commit is contained in:
parent
95f1d94219
commit
b168430fbf
@ -55,6 +55,7 @@ within Homer:
|
||||
url: "http://my-service-link"
|
||||
endpoint: "http://my-service-endpoint" # Optional: alternative base URL used to fetch service data is necessary.
|
||||
useCredentials: false # Optional: Override global proxy.useCredentials configuration.
|
||||
headers: # Optional: Override global proxy.headers configuration.
|
||||
type: "<type>"
|
||||
```
|
||||
|
||||
|
@ -19,7 +19,7 @@ export default {
|
||||
options.credentials = "include";
|
||||
}
|
||||
|
||||
if (this.proxy?.headers) {
|
||||
if (this.proxy?.headers && !!this.proxy.headers) {
|
||||
options.headers = this.proxy.headers;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ export default {
|
||||
}
|
||||
|
||||
// Each item can have their own headers
|
||||
if (this.item.headers !== undefined) {
|
||||
if (this.item.headers !== undefined && !!this.item.headers) {
|
||||
options.headers = this.item.headers;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user