mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: 修复后台面板无法访问的问题 (#490)
This commit is contained in:
parent
5bfd55e765
commit
7bc140a030
2 changed files with 22 additions and 8 deletions
|
|
@ -10,6 +10,7 @@ async function routes(fastify, options) {
|
|||
fastify.get('/help/*', async (request, reply) => {
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
reply.type('text/html').send(stream)
|
||||
return reply
|
||||
})
|
||||
fastify.get('/version', async (request, reply) => {
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
|
|
@ -19,6 +20,7 @@ async function routes(fastify, options) {
|
|||
fastify.get('/auth/*', async (request, reply) => {
|
||||
const stream = fs.createReadStream('plugins/chatgpt-plugin/server/static/index.html')
|
||||
reply.type('text/html').send(stream)
|
||||
return reply
|
||||
})
|
||||
fastify.get('/admin*', async (request, reply) => {
|
||||
const token = request.cookies.token || request.body?.token || 'unknown'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue