diff --git a/appinfo/routes.php b/appinfo/routes.php index 16101f6..eb63e71 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -15,7 +15,6 @@ return [ ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'], ['name' => 'episodes#action', 'url' => '/episodes/action', 'verb' => 'GET'], ['name' => 'episodes#list', 'url' => '/episodes/list', 'verb' => 'GET'], - ['name' => 'episodes#proxy', 'url' => '/episodes/proxy', 'verb' => 'GET'], ['name' => 'opml#export', 'url' => '/opml/export', 'verb' => 'GET'], ['name' => 'opml#import', 'url' => '/opml/import', 'verb' => 'POST'], ['name' => 'podcast#index', 'url' => '/podcast', 'verb' => 'GET'], diff --git a/lib/Controller/EpisodesController.php b/lib/Controller/EpisodesController.php index a06478a..8a47a6d 100644 --- a/lib/Controller/EpisodesController.php +++ b/lib/Controller/EpisodesController.php @@ -12,7 +12,6 @@ use OCA\RePod\Service\UserService; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\JSONResponse; -use OCP\AppFramework\Http\StreamResponse; use OCP\Http\Client\IClientService; use OCP\IRequest; @@ -47,12 +46,4 @@ class EpisodesController extends Controller return new JSONResponse([], Http::STATUS_NOT_FOUND); } - - /** - * @NoAdminRequired - * @NoCSRFRequired - */ - public function proxy(string $url): StreamResponse { - return new StreamResponse(fopen($url, 'r')); - } } diff --git a/src/store/player.js b/src/store/player.js index b541ccb..93113d5 100644 --- a/src/store/player.js +++ b/src/store/player.js @@ -49,10 +49,7 @@ export const player = { if (episode) { state.podcastUrl = decodeUrl(router.currentRoute.params.url) - const proxyUrl = new URL(episode.url) - audio.src = location.protocol === 'https:' && proxyUrl.protocol === 'http:' - ? generateUrl('/apps/repod/episodes/proxy?url={url}', { url: episode.url }) - : episode.url + audio.src = episode.url audio.load() audio.play()