mirror of https://github.com/bastienwirtz/homer
				
				
				
			fix: empty / null headers issue
							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