mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
Update Redirect
This commit is contained in:
parent
d0833de8e5
commit
2948da0657
@ -34,10 +34,10 @@ const REDIRECT = [
|
|||||||
// libravatar
|
// libravatar
|
||||||
['seccdn.libravatar.org/gravatarproxy/', 'https://secure.gravatar.com/'],
|
['seccdn.libravatar.org/gravatarproxy/', 'https://secure.gravatar.com/'],
|
||||||
// ghproxy
|
// ghproxy
|
||||||
['ghproxy.com/', ''],
|
['ghproxy.com/', 'https://'],
|
||||||
['ghps.cc/', ''],
|
['ghps.cc/', 'https://'],
|
||||||
// gh-proxy
|
// gh-proxy
|
||||||
['github.moeyy.xyz/', ''],
|
['github.moeyy.xyz/', 'https://'],
|
||||||
// 7ED Services
|
// 7ED Services
|
||||||
['use.sevencdn.com/css', 'https://fonts.googleapis.com/css'],
|
['use.sevencdn.com/css', 'https://fonts.googleapis.com/css'],
|
||||||
['use.sevencdn.com/ajax/libs/', 'https://cdnjs.cloudflare.com/ajax/libs/'],
|
['use.sevencdn.com/ajax/libs/', 'https://cdnjs.cloudflare.com/ajax/libs/'],
|
||||||
@ -65,6 +65,10 @@ const REDIRECT = [
|
|||||||
// KGitHub
|
// KGitHub
|
||||||
['raw.kgithub.com/', 'https://raw.githubusercontent.com/'],
|
['raw.kgithub.com/', 'https://raw.githubusercontent.com/'],
|
||||||
['raw.kkgithub.com/', 'https://raw.githubusercontent.com/'],
|
['raw.kkgithub.com/', 'https://raw.githubusercontent.com/'],
|
||||||
|
// Polyfill
|
||||||
|
['polyfill.io/', 'https://cdnjs.cloudflare.com/polyfill/'],
|
||||||
|
['fastly-polyfill.io/', 'https://cdnjs.cloudflare.com/polyfill/'],
|
||||||
|
['fastly-polyfill.net/', 'https://cdnjs.cloudflare.com/polyfill/'],
|
||||||
// Misc
|
// Misc
|
||||||
['pics.javbus.com/', 'https://i0.wp.com/pics.javbus.com/'],
|
['pics.javbus.com/', 'https://i0.wp.com/pics.javbus.com/'],
|
||||||
['googlefonts.wp-china-yes.net/', 'https://fonts.googleapis.com/'],
|
['googlefonts.wp-china-yes.net/', 'https://fonts.googleapis.com/'],
|
||||||
@ -84,10 +88,7 @@ export const buildRedirectModule = task(import.meta.path, async (span) => {
|
|||||||
`hostname = %APPEND% ${domains.join(', ')}`,
|
`hostname = %APPEND% ${domains.join(', ')}`,
|
||||||
'',
|
'',
|
||||||
'[URL Rewrite]',
|
'[URL Rewrite]',
|
||||||
...REDIRECT.map(([from, to]) => {
|
...REDIRECT.map(([from, to]) => `^https?://${escapeRegExp(from)}(.*) ${to}$1 302`)
|
||||||
const src = `^https?://${escapeRegExp(from)}(.*)`;
|
|
||||||
return `${src} ${to}$1 302`;
|
|
||||||
})
|
|
||||||
],
|
],
|
||||||
path.resolve(import.meta.dir, '../Modules/sukka_url_redirect.sgmodule')
|
path.resolve(import.meta.dir, '../Modules/sukka_url_redirect.sgmodule')
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user