mirror of
https://github.com/bastienwirtz/homer.git
synced 2025-06-27 21:21:41 +02: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"
|
url: "http://my-service-link"
|
||||||
endpoint: "http://my-service-endpoint" # Optional: alternative base URL used to fetch service data is necessary.
|
endpoint: "http://my-service-endpoint" # Optional: alternative base URL used to fetch service data is necessary.
|
||||||
useCredentials: false # Optional: Override global proxy.useCredentials configuration.
|
useCredentials: false # Optional: Override global proxy.useCredentials configuration.
|
||||||
|
headers: # Optional: Override global proxy.headers configuration.
|
||||||
type: "<type>"
|
type: "<type>"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ export default {
|
|||||||
options.credentials = "include";
|
options.credentials = "include";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.proxy?.headers) {
|
if (this.proxy?.headers && !!this.proxy.headers) {
|
||||||
options.headers = this.proxy.headers;
|
options.headers = this.proxy.headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Each item can have their own headers
|
// 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;
|
options.headers = this.item.headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user