Don't assume that origin is formatted correctly

Fixes https://app.getsentry.com/sentry/sentry/group/7454804/