From 87f24e30855624cf89ab22c64f77122bbf232b31 Mon Sep 17 00:00:00 2001 From: xmcp Date: Sat, 16 Feb 2019 20:02:05 +0800 Subject: [PATCH] update api port --- .gitignore | 1 + public/_redirects | 6 +++--- src/Common.js | 2 +- src/Flows.js | 2 +- src/UserAction.js | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 4173f7d..cd4edaa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.idea/ node_modules/ /build/ +build.* \ No newline at end of file diff --git a/public/_redirects b/public/_redirects index ac0520b..950cf22 100644 --- a/public/_redirects +++ b/public/_redirects @@ -1,3 +1,3 @@ -/api_proxy/* http://www.pkuhelper.com/services/pkuhole/:splat 200 -/audio_proxy/* http://www.pkuhelper.com/services/pkuhole/audios/:splat 200 -/login_proxy/* http://www.pkuhelper.com/services/login/:splat 200 \ No newline at end of file +/api_proxy/* http://www.pkuhelper.com:10301/services/pkuhole/:splat 200 +/audio_proxy/* http://www.pkuhelper.com:10301/services/pkuhole/audios/:splat 200 +/login_proxy/* http://www.pkuhelper.com:10301/services/login/:splat 200 \ No newline at end of file diff --git a/src/Common.js b/src/Common.js index f626f60..8be6f82 100644 --- a/src/Common.js +++ b/src/Common.js @@ -9,7 +9,7 @@ import './Common.css'; const chinese_format=buildFormatter(chineseStrings); -export const API_BASE=window.location.protocol==='https:' ? '/api_proxy' : 'http://www.pkuhelper.com/services/pkuhole'; +export const API_BASE=window.location.protocol==='https:' ? '/api_proxy' : 'http://www.pkuhelper.com:10301/services/pkuhole'; const PID_RE=/(^|[^\d])([1-9]\d{4,5})(?!\d)/g; const NICKNAME_RE=/(^|[^A-Za-z])((?:(?:Angry|Baby|Crazy|Diligent|Excited|Fat|Greedy|Hungry|Interesting|Japanese|Kind|Little|Magic|Naïve|Old|Powerful|Quiet|Rich|Superman|THU|Undefined|Valuable|Wifeless|Xiangbuchulai|Young|Zombie)\s)?(?:Alice|Bob|Carol|Dave|Eve|Francis|Grace|Hans|Isabella|Jason|Kate|Louis|Margaret|Nathan|Olivia|Paul|Queen|Richard|Susan|Thomas|Uma|Vivian|Winnie|Xander|Yasmine|Zach)|You Win(?: \d+)?|洞主)(?![A-Za-z])/gi; diff --git a/src/Flows.js b/src/Flows.js index 3a202e7..d7be3cd 100644 --- a/src/Flows.js +++ b/src/Flows.js @@ -9,7 +9,7 @@ import {TokenCtx, ReplyForm} from './UserAction'; import {API} from './flows_api'; -const IMAGE_BASE='http://www.pkuhelper.com/services/pkuhole/images/'; +const IMAGE_BASE='http://www.pkuhelper.com:10301/services/pkuhole/images/'; const AUDIO_BASE='/audio_proxy/'; const SEARCH_PAGESIZE=50; diff --git a/src/UserAction.js b/src/UserAction.js index d48dbe1..efc0f4c 100644 --- a/src/UserAction.js +++ b/src/UserAction.js @@ -5,7 +5,7 @@ import md5 from 'md5'; import './UserAction.css'; import {API_BASE} from './Common'; -const LOGIN_BASE=window.location.protocol==='https:' ? '/login_proxy' : 'http://www.pkuhelper.com/services/login'; +const LOGIN_BASE=window.location.protocol==='https:' ? '/login_proxy' : 'http://www.pkuhelper.com:10301/services/login'; const MAX_IMG_PX=2000; const MAX_IMG_FILESIZE=256000;