Append headers
This commit is contained in:
parent
41166cb82d
commit
084a8ab0c1
2 changed files with 8 additions and 8 deletions
|
|
@ -39,10 +39,10 @@ namespace LightReflectiveMirror.LoadBalancing
|
|||
public async Task ReceiveAuthKey(IHttpContext context)
|
||||
{
|
||||
var req = context.Request;
|
||||
string receivedAuthKey = req.Headers["Auth"];
|
||||
string endpointPort = req.Headers["EndpointPort"];
|
||||
string gamePort = req.Headers["GamePort"];
|
||||
string publicIP = req.Headers["PIP"];
|
||||
string receivedAuthKey = req.Headers["x-Auth"];
|
||||
string endpointPort = req.Headers["x-EndpointPort"];
|
||||
string gamePort = req.Headers["x-GamePort"];
|
||||
string publicIP = req.Headers["x-PIP"];
|
||||
|
||||
string address = context.Request.RemoteEndPoint.Address.ToString();
|
||||
Logger.WriteLogMessage("Received auth req [" + receivedAuthKey + "] == [" + Program.conf.AuthKey + "]");
|
||||
|
|
|
|||
|
|
@ -215,10 +215,10 @@ namespace LightReflectiveMirror
|
|||
string gamePort = 7777.ToString();
|
||||
HttpWebRequest authReq = (HttpWebRequest)WebRequest.Create(uri);
|
||||
|
||||
authReq.Headers.Add("Auth", conf.LoadBalancerAuthKey);
|
||||
authReq.Headers.Add("EndpointPort", endpointPort);
|
||||
authReq.Headers.Add("GamePort", gamePort);
|
||||
authReq.Headers.Add("PIP", publicIP); // Public IP
|
||||
authReq.Headers.Add("x-Auth", conf.LoadBalancerAuthKey);
|
||||
authReq.Headers.Add("x-EndpointPort", endpointPort);
|
||||
authReq.Headers.Add("x-GamePort", gamePort);
|
||||
authReq.Headers.Add("x-PIP", publicIP); // Public IP
|
||||
|
||||
var res = await authReq.GetResponseAsync();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue