Files
neonoverlordandClaude Fable 5 e5b4ecbf19
build / build (push) Successful in 5m38s
app: the client inside the Nextcloud frame — app-menu entry + framed page
'Social' in the app menu opens /app: a TemplateResponse whose content area
is one full-bleed same-origin iframe onto /client/ (frame-src 'self'). The
SPA keeps its own document and CSP carve-out; Nextcloud keeps its chrome —
the standard wrap for an SPA that must not inherit the shell's DOM/CSP.
Also canonicalizes /client -> /client/ (trailing slash): entered without
it, Sapper's router sees an empty path and relative resolution escapes
into the app. Brock's direction: it must feel like a normal NC app.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 18:15:29 -07:00

39 lines
1.7 KiB
PHP

<?php
/**
* Nextcloud - GoToSocial
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Julien Veyssier <julien-nc@posteo.net>
* @copyright Julien Veyssier 2020
*/
return [
'routes' => [
['name' => 'config#setConfig', 'url' => '/config', 'verb' => 'PUT'],
['name' => 'config#setSensitiveConfig', 'url' => '/sensitive-config', 'verb' => 'PUT'],
['name' => 'config#setAdminConfig', 'url' => '/admin-config', 'verb' => 'PUT'],
['name' => 'config#setSensitiveAdminConfig', 'url' => '/sensitive-admin-config', 'verb' => 'PUT'],
['name' => 'config#oauthRedirect', 'url' => '/oauth-redirect', 'verb' => 'GET'],
['name' => 'config#popupSuccessPage', 'url' => '/popup-success', 'verb' => 'GET'],
['name' => 'mastodonAPI#getNotifications', 'url' => '/notifications', 'verb' => 'GET'],
['name' => 'mastodonAPI#getHomeTimeline', 'url' => '/home', 'verb' => 'GET'],
['name' => 'mastodonAPI#getGoToSocialUrl', 'url' => '/url', 'verb' => 'GET'],
['name' => 'mastodonAPI#getGoToSocialAvatar', 'url' => '/avatar', 'verb' => 'GET'],
['name' => 'mastodonAPI#declareApp', 'url' => '/oauth-app', 'verb' => 'POST'],
// the bundled Pinnacle client (ops/features#30). Order matters:
// /client redirects to /client/ (the SPA needs the trailing slash
// or relative links escape into the app), /client/ serves the
// shell, and the catch-all owns everything deeper.
['name' => 'client#page', 'url' => '/app', 'verb' => 'GET'],
['name' => 'client#index', 'url' => '/client', 'verb' => 'GET'],
['name' => 'client#root', 'url' => '/client/', 'verb' => 'GET'],
['name' => 'client#serve', 'url' => '/client/{path}', 'verb' => 'GET',
'requirements' => ['path' => '.+']],
]
];