From a1aadee4d0ff5369bd7c0e4576ede4c02de935ab Mon Sep 17 00:00:00 2001 From: ttttmr <32825326+ttttmr@users.noreply.github.com> Date: Wed, 25 Sep 2024 01:55:29 +0800 Subject: [PATCH] fix: test --- .github/workflows/docker-test-cont.yml | 1 + .github/workflows/issue-command.yml | 1 + lib/routes.test.ts | 2 ++ 3 files changed, 4 insertions(+) diff --git a/.github/workflows/docker-test-cont.yml b/.github/workflows/docker-test-cont.yml index 47f83ac92f7064..24998dce9af8fa 100644 --- a/.github/workflows/docker-test-cont.yml +++ b/.github/workflows/docker-test-cont.yml @@ -68,6 +68,7 @@ jobs: --name rsshub \ -e NODE_ENV=dev \ -e LOGGER_LEVEL=debug \ + -e ALLOW_CIDR='127.0.0.1/32' -e ALLOW_USER_HOTLINK_TEMPLATE=true \ -p 1200:1200 \ rsshub:latest diff --git a/.github/workflows/issue-command.yml b/.github/workflows/issue-command.yml index 01133479eb5b3f..9fbabbb3ca8781 100644 --- a/.github/workflows/issue-command.yml +++ b/.github/workflows/issue-command.yml @@ -83,6 +83,7 @@ jobs: run: pnpm start & env: ALLOW_USER_HOTLINK_TEMPLATE: true + ALLOW_CIDR: '127.0.0.1/32' NODE_ENV: dev LOGGER_LEVEL: debug diff --git a/lib/routes.test.ts b/lib/routes.test.ts index e8476885e0bd31..02f623a547c9c9 100644 --- a/lib/routes.test.ts +++ b/lib/routes.test.ts @@ -4,6 +4,8 @@ import Parser from 'rss-parser'; const parser = new Parser(); import { config } from '@/config'; +process.env.ALLOW_CIDR = '127.0.0.1/32'; + const routes = { '/test/:id': '/test/1', };