mirror of
https://github.com/Telecominfraproject/wlan-cloud-userportal.git
synced 2025-11-01 02:57:53 +00:00
Adding support for IPv6.
This commit is contained in:
@@ -21,7 +21,9 @@ namespace OpenWifi {
|
||||
Poco::URI DestinationURI(Svc.PrivateEndPoint);
|
||||
DestinationURI.setPath(PathRewrite);
|
||||
DestinationURI.setQuery(SourceURI.getQuery());
|
||||
std::cout << Request->getMethod() << " " << DestinationURI.getHost() << ":" << DestinationURI.getPort() << DestinationURI.getPathAndQuery() << std::endl;
|
||||
|
||||
std::cout << " Source: " << SourceURI.toString() << std::endl;
|
||||
std::cout << "Destination: " << DestinationURI.toString() << std::endl;
|
||||
|
||||
Poco::Net::HTTPSClientSession Session(DestinationURI.getHost(), DestinationURI.getPort());
|
||||
Session.setKeepAlive(true);
|
||||
@@ -50,8 +52,10 @@ namespace OpenWifi {
|
||||
auto Body = P.parse(Request->stream()).extract<Poco::JSON::Object::Ptr>();
|
||||
Poco::JSON::Stringifier::condense(Body,SS);
|
||||
SS << "\r\n\r\n";
|
||||
} catch(...) {
|
||||
|
||||
} catch(const Poco::Exception &E) {
|
||||
std::cout << "E: " << E.name() << std::endl;
|
||||
std::cout << "E: " << E.message() << std::endl;
|
||||
std::cout << "E: " << E.what() << std::endl;
|
||||
}
|
||||
|
||||
std::cout << ">>>" << SS.str() << std::endl;
|
||||
|
||||
@@ -90,6 +90,7 @@ logout() {
|
||||
|
||||
startmfa() {
|
||||
payload="{ \"type\" : \"sms\" , \"sms\" : \"$1\" }"
|
||||
echo ${payload}
|
||||
curl ${FLAGS} -X PUT "https://${target_service_endpoint}/api/v1/submfa?startValidation=true" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${token}" \
|
||||
|
||||
Reference in New Issue
Block a user