 d7ad321176
			
		
	
	d7ad321176
	
	
	
		
			
			This comprehensive implementation includes: - FastAPI backend with MCP server integration - React/TypeScript frontend with Vite - PostgreSQL database with Redis caching - Grafana/Prometheus monitoring stack - Docker Compose orchestration - Full MCP protocol support for Claude Code integration Features: - Agent discovery and management across network - Visual workflow editor and execution engine - Real-time task coordination and monitoring - Multi-model support with specialized agents - Distributed development task allocation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
		
			
				
	
	
		
			58 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import platform from "../platform/index.js";
 | |
| import utils from "../utils.js";
 | |
| import isURLSameOrigin from "./isURLSameOrigin.js";
 | |
| import cookies from "./cookies.js";
 | |
| import buildFullPath from "../core/buildFullPath.js";
 | |
| import mergeConfig from "../core/mergeConfig.js";
 | |
| import AxiosHeaders from "../core/AxiosHeaders.js";
 | |
| import buildURL from "./buildURL.js";
 | |
| 
 | |
| export default (config) => {
 | |
|   const newConfig = mergeConfig({}, config);
 | |
| 
 | |
|   let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
 | |
| 
 | |
|   newConfig.headers = headers = AxiosHeaders.from(headers);
 | |
| 
 | |
|   newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
 | |
| 
 | |
|   // HTTP basic authentication
 | |
|   if (auth) {
 | |
|     headers.set('Authorization', 'Basic ' +
 | |
|       btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
 | |
|     );
 | |
|   }
 | |
| 
 | |
|   let contentType;
 | |
| 
 | |
|   if (utils.isFormData(data)) {
 | |
|     if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
 | |
|       headers.setContentType(undefined); // Let the browser set it
 | |
|     } else if ((contentType = headers.getContentType()) !== false) {
 | |
|       // fix semicolon duplication issue for ReactNative FormData implementation
 | |
|       const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
 | |
|       headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
 | |
|     }
 | |
|   }
 | |
| 
 | |
|   // Add xsrf header
 | |
|   // This is only done if running in a standard browser environment.
 | |
|   // Specifically not if we're in a web worker, or react-native.
 | |
| 
 | |
|   if (platform.hasStandardBrowserEnv) {
 | |
|     withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
 | |
| 
 | |
|     if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
 | |
|       // Add xsrf header
 | |
|       const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
 | |
| 
 | |
|       if (xsrfValue) {
 | |
|         headers.set(xsrfHeaderName, xsrfValue);
 | |
|       }
 | |
|     }
 | |
|   }
 | |
| 
 | |
|   return newConfig;
 | |
| }
 | |
| 
 |