mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 00:04:43 +01:00
Add new config option to allow any address to be advertised. This then doesn't rely on the master server retrieving the server IP address via the HTTP request which can often be IPv6 by default.
This commit is contained in:
@@ -177,10 +177,16 @@ namespace Http
|
||||
if (hConnect == nullptr)
|
||||
ThrowWin32Exception("WinHttpConnect");
|
||||
|
||||
auto dwFlags = 0;
|
||||
if (lstrcmpiW(std::wstring(url.lpszScheme, url.dwSchemeLength).c_str(), L"https") == 0)
|
||||
{
|
||||
dwFlags = WINHTTP_FLAG_SECURE;
|
||||
}
|
||||
|
||||
auto wVerb = GetVerb(req.method);
|
||||
auto wQuery = std::wstring(url.lpszUrlPath, url.dwUrlPathLength);
|
||||
hRequest = WinHttpOpenRequest(
|
||||
hConnect, wVerb, wQuery.c_str(), NULL, WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES, WINHTTP_FLAG_SECURE);
|
||||
hConnect, wVerb, wQuery.c_str(), NULL, WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES, dwFlags);
|
||||
if (hRequest == nullptr)
|
||||
ThrowWin32Exception("WinHttpOpenRequest");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user