mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-12-01 17:03:04 +00:00
feat: 新增官方前端 sub.xream.eu.org
This commit is contained in:
10 files changed
+18
-18
No files matched your search
@@ -7,7 +7,7 @@ import { describe, it } from 'mocha';
|
||||
import { load } from '@/utils/yaml';
|
||||
|
||||
const DEFAULT_ORIGINS =
|
||||
'https://sub-store.vercel.app,http://substore.stash,https://substore.stash';
|
||||
'https://sub-store.vercel.app,http://substore.stash,https://substore.stash,https://sub.xream.eu.org';
|
||||
|
||||
describe('module CORS allowlist config', function () {
|
||||
it('adds the default CORS argument to Surge modules', function () {
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ describe('express CORS allowlist adapter', function () {
|
||||
expect(
|
||||
logs.filter((log) => log.startsWith('[CORS]')),
|
||||
).to.deep.equal([
|
||||
'[CORS] SUB_STORE_CORS_ALLOWED_ORIGINS is not set; using default allowed origins: https://sub-store.vercel.app,http://substore.stash,https://substore.stash',
|
||||
'[CORS] SUB_STORE_CORS_ALLOWED_ORIGINS is not set; using default allowed origins: https://sub-store.vercel.app,http://substore.stash,https://substore.stash,https://sub.xream.eu.org',
|
||||
]);
|
||||
},
|
||||
);
|
||||
@@ -86,7 +86,7 @@ describe('express CORS allowlist adapter', function () {
|
||||
expect(
|
||||
logs.filter((log) => log.startsWith('[CORS]')),
|
||||
).to.deep.equal([
|
||||
'[CORS] allowed origins: https://sub-store.vercel.app,http://substore.stash,https://substore.stash,http://localhost:<any-port>,http://127.0.0.1:<any-port> (default:node)',
|
||||
'[CORS] allowed origins: https://sub-store.vercel.app,http://substore.stash,https://substore.stash,https://sub.xream.eu.org,http://localhost:<any-port>,http://127.0.0.1:<any-port> (default:node)',
|
||||
]);
|
||||
},
|
||||
'custom',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
export const NODE_CORS_ALLOWED_ORIGINS_ENV = 'SUB_STORE_CORS_ALLOWED_ORIGINS';
|
||||
export const NON_NODE_CORS_DEFAULT =
|
||||
'https://sub-store.vercel.app,http://substore.stash,https://substore.stash';
|
||||
'https://sub-store.vercel.app,http://substore.stash,https://substore.stash,https://sub.xream.eu.org';
|
||||
export const NODE_CORS_DEFAULT = NON_NODE_CORS_DEFAULT;
|
||||
export const CORS_ARGUMENT_KEY = 'cors';
|
||||
|
||||
|
||||
Reference in new issue
Block a user