@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhabricatorPhurlShortURLDefaultController
4 extends PhabricatorPhurlController {
5
6 public function shouldRequireLogin() {
7 return false;
8 }
9
10 public function handleRequest(AphrontRequest $request) {
11 $dialog = $this->newDialog()
12 ->setTitle(pht('Invalid URL'))
13 ->appendParagraph(
14 pht('This domain can only be used to open URLs'.
15 ' shortened using the Phurl application. The'.
16 ' URL you are trying to access does not have'.
17 ' a Phurl URL associated with it.'));
18
19 return id(new AphrontDialogResponse())
20 ->setDialog($dialog)
21 ->setHTTPResponseCode(404);
22 }
23}