mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-24 19:31:49 +01:00
switch over to cloudflare worker
This commit is contained in:
parent
265d33d24b
commit
f0d71d1124
@ -1,6 +1,6 @@
|
|||||||
import { unpack } from '../util/unpacker';
|
import { unpack } from '../util/unpacker';
|
||||||
|
|
||||||
const CORS_URL = 'https://movie-web-proxy.herokuapp.com/';
|
const CORS_URL = 'https://proxy-01.movie-web.workers.dev/?';
|
||||||
const BASE_URL = `${CORS_URL}https://gomo.to`;
|
const BASE_URL = `${CORS_URL}https://gomo.to`;
|
||||||
const MOVIE_URL = `${BASE_URL}/movie`
|
const MOVIE_URL = `${BASE_URL}/movie`
|
||||||
const DECODING_URL = `${BASE_URL}/decoding_v3.php`
|
const DECODING_URL = `${BASE_URL}/decoding_v3.php`
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import Fuse from 'fuse.js'
|
import Fuse from 'fuse.js'
|
||||||
import JSON5 from 'json5'
|
import JSON5 from 'json5'
|
||||||
|
|
||||||
const CORS_URL = `https://movie-web-proxy.herokuapp.com`;
|
const CORS_URL = `https://proxy-01.movie-web.workers.dev/?`;
|
||||||
const BASE_URL = `${CORS_URL}/https://lookmovie.io`;
|
const BASE_URL = `${CORS_URL}https://lookmovie.io`;
|
||||||
|
|
||||||
async function findContent(searchTerm, type) {
|
async function findContent(searchTerm, type) {
|
||||||
const searchUrl = `${BASE_URL}/${type}s/search/?q=${encodeURIComponent(searchTerm)}`;
|
const searchUrl = `${BASE_URL}/${type}s/search/?q=${encodeURIComponent(searchTerm)}`;
|
||||||
|
@ -109,16 +109,16 @@ export function SearchView() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
React.useEffect(() => {
|
// React.useEffect(() => {
|
||||||
async function fetchHealth() {
|
// async function fetchHealth() {
|
||||||
const HOME_URL = "https://movie-web-proxy.herokuapp.com"
|
// const HOME_URL = "https://proxy-01.movie-web.workers.dev/?"
|
||||||
await fetch(HOME_URL).catch(() => {
|
// await fetch(HOME_URL).catch(() => {
|
||||||
// Request failed; source likely offline
|
// // Request failed; source likely offline
|
||||||
setErrorStatus(`Our content provider is currently offline, apologies.`)
|
// setErrorStatus(`Our content provider is currently offline, apologies.`)
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
fetchHealth()
|
// fetchHealth()
|
||||||
}, []);
|
// }, []);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (streamRouteMatch) {
|
if (streamRouteMatch) {
|
||||||
|
Loading…
Reference in New Issue
Block a user