http
http copied to clipboard
Http client not working with Two server including Loadbalancer with cookies
So the app is requesting AWS server with loadbalancer also running, and passing the load balancer cookie inside request header is not working with http client . But when i disable loadbalancer from aws and hit only one server from http client it works. So the http client is not able to distinguish between actual server and loadbalancer . What's the solution for this. Thanks in advance
final dio = Dio();
// add the interceptor dio.interceptors.add(CurlLoggerDioInterceptor(printOnSuccess: true));
dio.get(apiUrl,
options: Options(
headers: {
"sessionId": userId,
'Content-Type': 'application/json',
sakaiSessionKey: sakaiSessionValue,
awsSessionKey: awsSessionValue,
},
));
var response = await http.get(Uri.parse(apiUrl), headers: {
"sessionId": userId,
'Content-Type': 'application/json',
// awsSessionKey: awsSessionValue,
// sakaiSessionKey: sakaiSessionValue
});