Switch Cyclone's prefix from /service to /service/next

If a user navigates to a UV link directly, without the service worker
registered, Cyclone's bare server will take over and interpret the URL
as http://go/..., which you definitely didn't want, unless you happen
to work at Google :P
This commit is contained in:
CountBleck 2022-09-04 20:38:04 -07:00
parent d62811a34a
commit 1fb7d3c6fc
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ import filter from './cyclone/filter.cyclone.mjs';
import * as security from './cyclone/security.cyclone.mjs'; import * as security from './cyclone/security.cyclone.mjs';
const config = { const config = {
prefix: "/service", prefix: "/service/next",
requireSSL: true, // Requires SSL? requireSSL: true, // Requires SSL?
defaultHeaders: { defaultHeaders: {
'X-Content-Type-Options': 'no-sniff', 'X-Content-Type-Options': 'no-sniff',

View file

@ -77,7 +77,7 @@ window.addEventListener('load', () => {
let url = value.trim(); let url = value.trim();
if (!isUrl(url)) url = 'www.google.com/search?q=' + url; if (!isUrl(url)) url = 'www.google.com/search?q=' + url;
if (!(url.startsWith('https://') || url.startsWith('http://'))) url = 'http://' + url; if (!(url.startsWith('https://') || url.startsWith('http://'))) url = 'http://' + url;
let redirectTo = '/service/' + url; let redirectTo = '/service/next/' + url;
const option = localStorage.getItem('nogg'); const option = localStorage.getItem('nogg');
if (option === 'on') { if (option === 'on') {
stealthEngine(redirectTo); stealthEngine(redirectTo);