Revert "feat: Proxy episodes when they are behind an unsecure http server"
This reverts commit 2398c9749d
.
This commit is contained in:
parent
a16556c0eb
commit
c6f06a9f29
@ -15,7 +15,6 @@ return [
|
|||||||
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
||||||
['name' => 'episodes#action', 'url' => '/episodes/action', 'verb' => 'GET'],
|
['name' => 'episodes#action', 'url' => '/episodes/action', 'verb' => 'GET'],
|
||||||
['name' => 'episodes#list', 'url' => '/episodes/list', '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#export', 'url' => '/opml/export', 'verb' => 'GET'],
|
||||||
['name' => 'opml#import', 'url' => '/opml/import', 'verb' => 'POST'],
|
['name' => 'opml#import', 'url' => '/opml/import', 'verb' => 'POST'],
|
||||||
['name' => 'podcast#index', 'url' => '/podcast', 'verb' => 'GET'],
|
['name' => 'podcast#index', 'url' => '/podcast', 'verb' => 'GET'],
|
||||||
|
@ -12,7 +12,6 @@ use OCA\RePod\Service\UserService;
|
|||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\AppFramework\Http\StreamResponse;
|
|
||||||
use OCP\Http\Client\IClientService;
|
use OCP\Http\Client\IClientService;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
@ -47,12 +46,4 @@ class EpisodesController extends Controller
|
|||||||
|
|
||||||
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @NoAdminRequired
|
|
||||||
* @NoCSRFRequired
|
|
||||||
*/
|
|
||||||
public function proxy(string $url): StreamResponse {
|
|
||||||
return new StreamResponse(fopen($url, 'r'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -49,10 +49,7 @@ export const player = {
|
|||||||
|
|
||||||
if (episode) {
|
if (episode) {
|
||||||
state.podcastUrl = decodeUrl(router.currentRoute.params.url)
|
state.podcastUrl = decodeUrl(router.currentRoute.params.url)
|
||||||
const proxyUrl = new URL(episode.url)
|
audio.src = episode.url
|
||||||
audio.src = location.protocol === 'https:' && proxyUrl.protocol === 'http:'
|
|
||||||
? generateUrl('/apps/repod/episodes/proxy?url={url}', { url: episode.url })
|
|
||||||
: episode.url
|
|
||||||
audio.load()
|
audio.load()
|
||||||
audio.play()
|
audio.play()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user