export default {
props: {
proxy: Object,
+ forwarder: Object,
},
created: function () {
// custom service often consume info from an API using the item link (url) as a base url,
this.item.useCredentials === true ? "include" : "omit";
}
- if (this.proxy?.apikey) {
+ if (this.forwarder?.apikey) {
options.headers = {
- "X-Homer-Api-Key": this.proxy.apikey,
+ "X-Homer-Forwarder-Api-Key": this.forwarder.apikey,
};
}
let url = path ? `${this.endpoint}/${path}` : this.endpoint;
- if (this.proxy?.url) {
+ if (this.forwarder?.url) {
options.headers = {
...(options.headers || {}),
- "X-Homer-Api-Url": url,
+ "X-Homer-Forwarder-Url": url,
};
- url = this.proxy.url;
+ url = this.forwarder.url;
}
options = merge(options, init);