aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/lookup.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/routes/lookup.php b/routes/lookup.php
index 62d9e48..903c1b9 100644
--- a/routes/lookup.php
+++ b/routes/lookup.php
@@ -12,9 +12,12 @@ Router::getInstance()->mount('/lookup', function (array $args) {
throw new BadRequest('please provide a `uri` query parameter');
}
$uri = $_GET['uri'];
- if (!str_starts_with($uri, 'https://')) {
+ if (!(str_starts_with($uri, 'https://') || str_starts_with($uri, 'web+pawpub://'))) {
throw new BadRequest('dodgy looking uri');
}
+ if (str_starts_with($uri, 'web+pawpub://')) {
+ $uri = substr_replace($uri, 'https', 0, 10);
+ }
// try looking it up as a note
try {