diff options
Diffstat (limited to 'include/event_service_store.hpp')
-rw-r--r-- | include/event_service_store.hpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/event_service_store.hpp b/include/event_service_store.hpp index 61f1ac7b0f..8b24fcbe83 100644 --- a/include/event_service_store.hpp +++ b/include/event_service_store.hpp @@ -3,6 +3,7 @@ #include <boost/beast/http/fields.hpp> #include <boost/container/flat_map.hpp> +#include <boost/url/parse.hpp> #include <nlohmann/json.hpp> namespace persistent_data @@ -11,7 +12,7 @@ namespace persistent_data struct UserSubscription { std::string id; - std::string destinationUrl; + boost::urls::url destinationUrl; std::string protocol; std::string retryPolicy; std::string customText; @@ -48,7 +49,13 @@ struct UserSubscription { continue; } - subvalue->destinationUrl = *value; + boost::urls::result<boost::urls::url> url = + boost::urls::parse_absolute_uri(*value); + if (!url) + { + continue; + } + subvalue->destinationUrl = std::move(*url); } else if (element.key() == "Protocol") { |