feat: remove authentication

This commit is contained in:
DIYgod 2024-02-22 02:16:14 +08:00
parent 34783aa686
commit e4ee2ef98f
No known key found for this signature in database
2 changed files with 0 additions and 20 deletions

View File

@ -43,10 +43,6 @@ export type Config = {
proxyStrategy: string;
pacUri?: string;
pacScript?: string;
authentication: {
name: string;
pass: string;
};
denylist?: string[];
allowlist?: string[];
allowLocalhost: boolean;
@ -375,11 +371,6 @@ const calculateValue = () => {
proxyStrategy: envs.PROXY_STRATEGY || 'all', // all / on_retry
pacUri: envs.PAC_URI,
pacScript: envs.PAC_SCRIPT,
// auth
authentication: {
name: envs.HTTP_BASIC_AUTH_NAME || 'usernam3',
pass: envs.HTTP_BASIC_AUTH_PASS || 'passw0rd',
},
// access control
denylist: envs.DENYLIST ? envs.DENYLIST.split(',') : undefined,
allowlist: envs.ALLOWLIST ? envs.ALLOWLIST.split(',') : undefined,

View File

@ -1,11 +0,0 @@
const Router = require('@koa/router');
const router = new Router();
const auth = require('koa-basic-auth');
const config = require('./config').value;
router.use('/(.*)', auth(config.authentication));
// RSSHub
router.get('/rsshub/routes/:lang?', require('./v2/rsshub/routes'));
module.exports = router;