Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
0e833628
Commit
0e833628
authored
Apr 05, 2025
by
liuxinlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改代理
parent
586ac3f4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
8 deletions
+26
-8
.env.development
+1
-1
config/mockCookie.txt
+2
-0
config/proxy.js
+16
-0
public/api.js
+7
-7
No files found.
.env.development
View file @
0e833628
HOST=localhost
PORT=
3000
PORT=
7777
config/mockCookie.txt
0 → 100644
View file @
0e833628
UM_distinctid=1930b610f8be12-00856c472e2e16-1f525636-13c680-1930b610f8c32ce; JESONG_USER_ID=01000000027526106273070665702551; uid=703773; uname=%E6%89%8B%E6%9C%BA%E7%94%A8%E6%88%B7703773; role=3; user_name=%E6%89%8B%E6%9C%BA%E7%94%A8%E6%88%B7703773; avatar_file=https%3A%2F%2Fjulyedu-img-public.oss-cn-beijing.aliyuncs.com%2FPublic%2FImage%2Fhome%2Favatar_20191104.png; tfstk=g27KIBvcv5hLOeL0-yZiq2rTZkPgjaCeX95jrLvnVOBOaT3n-UYHVQ9OKDYoxWR-PdByKHYCETHRKOXJ4WJkFLBlNMVgorfFTU85e-40oSs3u-XKd397NVO2w5AIQv8FBU87nRmiPHzvztRM2RbC15dkZLM5FpM_6QdBP2tSRcM6QQTWPHgW5hOywXGBAT1_6QJ6FUTWrCq9UD9myi7Q3J5LUC0SPNdpXlfHCmph5BKph6_KP4GX9HpfOdy4UDh229KdSyH29G1AQBBzu28B2MsXRaeYJF1Vj9OOF-nJCiQFynbLHmJC8LWvRGesJUTeM_Kcj7ivIg1NWhQLmbRN-__emEaqdLjGMadRz8zOH66dcn_Ipg7CoZI85xvvZDNT60oyACkf3r2y9VajLCp0sBmr4hEw6KVtu0oyACR9n5Vj40-Tb; token=5ea65083947e06e9-2f9c41391bc9bc3d; access_token=5ea65083947e06e9-2f9c41391bc9bc3d; JESONG_AUTO_MON_TIMES=0; JESONG_VISITOR_ID=01000000027526385103079145651456; ssid=jlo1quiip5ct0h7crp783qd23f; ccode=0; plat=5
\ No newline at end of file
config/proxy.js
View file @
0e833628
const
fs
=
require
(
"fs"
)
const
path
=
require
(
"path"
)
const
cookiePath
=
path
.
resolve
(
__dirname
,
"./mockCookie.txt"
)
const
cookie
=
fs
.
readFileSync
(
cookiePath
,
"utf8"
)
function
setCookieOnProxyReq
(
proxyReq
,
req
,
res
)
{
proxyReq
.
setHeader
(
"Cookie"
,
cookie
)
}
module
.
exports
=
{
"/homeApi"
:
{
target
:
"https://fast.julyedu.com"
,
changeOrigin
:
true
,
secure
:
false
,
pathRewrite
:
{
"^/homeApi"
:
""
},
onProxyReq
:
setCookieOnProxyReq
,
},
"/baseApi"
:
{
target
:
"https://api.julyedu.com"
,
changeOrigin
:
true
,
secure
:
false
,
pathRewrite
:
{
"^/baseApi"
:
""
},
onProxyReq
:
setCookieOnProxyReq
,
},
"/searchApi"
:
{
target
:
"https://search.julyedu.com"
,
changeOrigin
:
true
,
secure
:
false
,
pathRewrite
:
{
"^/searchApi"
:
""
},
onProxyReq
:
setCookieOnProxyReq
,
},
"/passportApi"
:
{
target
:
"https://passport.julyedu.com"
,
changeOrigin
:
true
,
secure
:
false
,
pathRewrite
:
{
"^/passportApi"
:
""
},
onProxyReq
:
setCookieOnProxyReq
,
},
"/record"
:
{
target
:
"https://record.julyedu.com"
,
changeOrigin
:
true
,
secure
:
false
,
pathRewrite
:
{
"^/record"
:
""
},
onProxyReq
:
setCookieOnProxyReq
,
},
"/mApi"
:
{
target
:
"https://m.julyedu.com"
,
changeOrigin
:
true
,
secure
:
false
,
pathRewrite
:
{
"^/mApi"
:
""
},
onProxyReq
:
setCookieOnProxyReq
,
},
"/ai-search"
:
{
target
:
"https://ai-search.julyedu.com"
,
changeOrigin
:
true
,
secure
:
false
,
pathRewrite
:
{
"^/ai-search"
:
""
},
onProxyReq
:
setCookieOnProxyReq
,
},
}
public/api.js
View file @
0e833628
var
API
=
{
'www'
:
'http://www-test.julyedu.com'
,
'home'
:
'http://localhost:
3000
/homeApi'
,
'search-api'
:
'http://localhost:
3000
/searchApi'
,
'passport-api'
:
'http://localhost:
3000
/passportApi'
,
'base-api'
:
'http://localhost:
3000
/baseApi'
,
'record'
:
'http://localhost:
3000
/record'
,
'home'
:
'http://localhost:
7777
/homeApi'
,
'search-api'
:
'http://localhost:
7777
/searchApi'
,
'passport-api'
:
'http://localhost:
7777
/passportApi'
,
'base-api'
:
'http://localhost:
7777
/baseApi'
,
'record'
:
'http://localhost:
7777
/record'
,
'process-api'
:
'ws:process-test.julyedu.com:9502'
,
'm'
:
'http://localhost:
3000
/mApi'
,
'ai-search'
:
'http://localhost:
3000
/ai-search'
,
'm'
:
'http://localhost:
7777
/mApi'
,
'ai-search'
:
'http://localhost:
7777
/ai-search'
,
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment