Remove references to short domain
This commit is contained in:
parent
328c9badb4
commit
7a58287b34
27 changed files with 215 additions and 404 deletions
|
@ -60,7 +60,7 @@ class PasskeysController extends Controller
|
|||
// RP Entity i.e. the application
|
||||
$rpEntity = PublicKeyCredentialRpEntity::create(
|
||||
config('app.name'),
|
||||
config('url.longurl'),
|
||||
config('app.url'),
|
||||
);
|
||||
|
||||
// User Entity
|
||||
|
@ -148,7 +148,7 @@ class PasskeysController extends Controller
|
|||
);
|
||||
$securedRelyingPartyId = [];
|
||||
if (App::environment('local', 'development')) {
|
||||
$securedRelyingPartyId = [config('url.longurl')];
|
||||
$securedRelyingPartyId = [config('app.url')];
|
||||
}
|
||||
$ceremonyStepManagerFactory->setSecuredRelyingPartyId($securedRelyingPartyId);
|
||||
|
||||
|
@ -165,7 +165,7 @@ class PasskeysController extends Controller
|
|||
$publicKeyCredentialSource = $authenticatorAttestationResponseValidator->check(
|
||||
authenticatorAttestationResponse: $publicKeyCredential->response,
|
||||
publicKeyCredentialCreationOptions: $publicKeyCredentialCreationOptions,
|
||||
request: config('url.longurl'),
|
||||
request: config('app.url'),
|
||||
securedRelyingPartyId: $securedRelyingPartyId,
|
||||
);
|
||||
|
||||
|
@ -258,7 +258,7 @@ class PasskeysController extends Controller
|
|||
);
|
||||
$securedRelyingPartyId = [];
|
||||
if (App::environment('local', 'development')) {
|
||||
$securedRelyingPartyId = [config('url.longurl')];
|
||||
$securedRelyingPartyId = [config('app.url')];
|
||||
}
|
||||
$ceremonyStepManagerFactory->setSecuredRelyingPartyId($securedRelyingPartyId);
|
||||
|
||||
|
@ -277,7 +277,7 @@ class PasskeysController extends Controller
|
|||
credentialId: $publicKeyCredentialSource,
|
||||
authenticatorAssertionResponse: $publicKeyCredential->response,
|
||||
publicKeyCredentialRequestOptions: $publicKeyCredentialRequestOptions,
|
||||
request: config('url.longurl'),
|
||||
request: config('app.url'),
|
||||
userHandle: null,
|
||||
securedRelyingPartyId: $securedRelyingPartyId,
|
||||
);
|
||||
|
|
|
@ -122,8 +122,8 @@ class FeedsController extends Controller
|
|||
|
||||
foreach ($notes as $key => $note) {
|
||||
$data['items'][$key] = [
|
||||
'id' => $note->longurl,
|
||||
'url' => $note->longurl,
|
||||
'id' => $note->uri,
|
||||
'url' => $note->uri,
|
||||
'content_text' => $note->content,
|
||||
'date_published' => $note->created_at->tz('UTC')->toRfc3339String(),
|
||||
'date_modified' => $note->updated_at->tz('UTC')->toRfc3339String(),
|
||||
|
@ -164,7 +164,7 @@ class FeedsController extends Controller
|
|||
'author' => [
|
||||
'type' => 'card',
|
||||
'name' => config('user.display_name'),
|
||||
'url' => config('url.longurl'),
|
||||
'url' => config('app.url'),
|
||||
],
|
||||
'children' => $items,
|
||||
], 200, [
|
||||
|
@ -183,8 +183,8 @@ class FeedsController extends Controller
|
|||
$items[] = [
|
||||
'type' => 'entry',
|
||||
'published' => $note->created_at,
|
||||
'uid' => $note->longurl,
|
||||
'url' => $note->longurl,
|
||||
'uid' => $note->uri,
|
||||
'url' => $note->uri,
|
||||
'content' => [
|
||||
'text' => $note->getRawOriginal('note'),
|
||||
'html' => $note->note,
|
||||
|
@ -200,7 +200,7 @@ class FeedsController extends Controller
|
|||
'author' => [
|
||||
'type' => 'card',
|
||||
'name' => config('user.display_name'),
|
||||
'url' => config('url.longurl'),
|
||||
'url' => config('app.url'),
|
||||
],
|
||||
'children' => $items,
|
||||
], 200, [
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
||||
/**
|
||||
* @psalm-suppress UnusedClass
|
||||
*/
|
||||
class ShortURLsController extends Controller
|
||||
{
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Short URL Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This redirects the short urls to long ones
|
||||
|
|
||||
*/
|
||||
|
||||
/**
|
||||
* Redirect from '/' to the long url.
|
||||
*/
|
||||
public function baseURL(): RedirectResponse
|
||||
{
|
||||
return redirect(config('app.url'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect from '/@' to a twitter profile.
|
||||
*/
|
||||
public function twitter(): RedirectResponse
|
||||
{
|
||||
return redirect('https://twitter.com/jonnybarnes');
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect a short url of this site out to a long one based on post type.
|
||||
*
|
||||
* Further redirects may happen.
|
||||
*/
|
||||
public function expandType(string $type, string $postId): RedirectResponse
|
||||
{
|
||||
if ($type === 't') {
|
||||
$type = 'notes';
|
||||
}
|
||||
if ($type === 'b') {
|
||||
$type = 'blog/s';
|
||||
}
|
||||
|
||||
return redirect(config('app.url') . '/' . $type . '/' . $postId);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue