diff --git a/lib/sentry.dart b/lib/sentry.dart index aa46678652..b6eef96b4c 100644 --- a/lib/sentry.dart +++ b/lib/sentry.dart @@ -161,7 +161,7 @@ class SentryClient { @visibleForTesting String get postUri => - '${dsnUri.scheme}://${dsnUri.host}/api/$projectId/store/'; + '${dsnUri.scheme}://${dsnUri.host}${dsnUri.port != 80 && dsnUri.port != 443 ? ':' + dsnUri.port.toString() : ''}/api/$projectId/store/'; /// Reports an [event] to Sentry.io. Future capture(