mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 23:56:39 +08:00
优化
This commit is contained in:
parent
2797022f64
commit
c9f21e3f0f
4
.github/workflows/dockerToHub-dev.yml
vendored
4
.github/workflows/dockerToHub-dev.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: 'dev'
|
ref: 'dev'
|
||||||
clean: true
|
clean: false
|
||||||
github-server-url: 'https://gh.siji.ci'
|
github-server-url: 'https://gh.siji.ci'
|
||||||
- name: build and deploy to Docker Hub
|
- name: build and deploy to Docker Hub
|
||||||
run: |
|
run: |
|
||||||
@ -70,4 +70,4 @@ jobs:
|
|||||||
docker-compose pull && docker-compose up -d
|
docker-compose pull && docker-compose up -d
|
||||||
yes | docker image prune
|
yes | docker image prune
|
||||||
rm -rf /www/server/nginx/proxy_cache_dir/*
|
rm -rf /www/server/nginx/proxy_cache_dir/*
|
||||||
rm -rf /www/server/nginx/proxy_temp_dir/*
|
rm -rf /www/server/nginx/proxy_temp_dir/*
|
||||||
|
2
.github/workflows/dockerToHub.yml
vendored
2
.github/workflows/dockerToHub.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
clean: true
|
clean: false
|
||||||
github-server-url: 'https://gh.siji.ci'
|
github-server-url: 'https://gh.siji.ci'
|
||||||
- name: build and deploy to Docker Hub
|
- name: build and deploy to Docker Hub
|
||||||
run: |
|
run: |
|
||||||
|
@ -70,7 +70,7 @@ export const authOptions: NextAuthOptions = {
|
|||||||
error: "/login", // Error code passed in query string as ?error=
|
error: "/login", // Error code passed in query string as ?error=
|
||||||
},
|
},
|
||||||
adapter: PrismaAdapter(prisma),
|
adapter: PrismaAdapter(prisma),
|
||||||
session: { strategy: "jwt", maxAge: 7 * 24 * 60 * 60 },
|
session: { strategy: "jwt", maxAge: 3 * 24 * 60 * 60 },
|
||||||
cookies: {
|
cookies: {
|
||||||
sessionToken: {
|
sessionToken: {
|
||||||
name: `${SECURE_COOKIES ? "__Secure-" : ""}next-auth.session-token`,
|
name: `${SECURE_COOKIES ? "__Secure-" : ""}next-auth.session-token`,
|
||||||
@ -109,7 +109,7 @@ export const authOptions: NextAuthOptions = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function getSession() {
|
export function getSession() {
|
||||||
// console.log('in........',)
|
console.log('in........',)
|
||||||
return getServerSession(authOptions) as Promise<{
|
return getServerSession(authOptions) as Promise<{
|
||||||
user: {
|
user: {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { NextResponse } from "next/server";
|
import { NextResponse } from "next/server";
|
||||||
import type { NextRequest } from "next/server";
|
import type { NextRequest } from "next/server";
|
||||||
import { getToken } from "next-auth/jwt";
|
import { getToken } from "next-auth/jwt";
|
||||||
import {DENY_LIST, isName} from "@/lib/auth_list";
|
import { DENY_LIST, isName } from "@/lib/auth_list";
|
||||||
|
|
||||||
export default async function middleware(req: NextRequest) {
|
export default async function middleware(req: NextRequest) {
|
||||||
const url = req.nextUrl;
|
const url = req.nextUrl;
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
"@tailwindcss/forms": "^0.5.7",
|
"@tailwindcss/forms": "^0.5.7",
|
||||||
"@tailwindcss/typography": "^0.5.10",
|
"@tailwindcss/typography": "^0.5.10",
|
||||||
"@tauri-apps/cli": "^1.5.8",
|
"@tauri-apps/cli": "^1.5.8",
|
||||||
|
"@types/cookie": "^0.6.0",
|
||||||
"@types/node": "^20.11.10",
|
"@types/node": "^20.11.10",
|
||||||
"@types/react": "^18.2.48",
|
"@types/react": "^18.2.48",
|
||||||
"@types/react-dom": "^18.2.7",
|
"@types/react-dom": "^18.2.7",
|
||||||
|
Loading…
Reference in New Issue
Block a user