支持更换头像

This commit is contained in:
whyour
2022-05-09 15:31:41 +08:00
parent 2c9b283b75
commit fb6a80e306
12 changed files with 127 additions and 29 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
import { Request, Response, NextFunction, Application } from 'express';
import express, { Request, Response, NextFunction, Application } from 'express';
import bodyParser from 'body-parser';
import cors from 'cors';
import routes from '../api';
@@ -17,6 +17,7 @@ import { EnvModel } from '../data/env';
export default ({ app }: { app: Application }) => {
app.enable('trust proxy');
app.use(cors());
app.use(`${config.api.prefix}/static`, express.static(config.uploadPath));
app.use((req, res, next) => {
if (req.path.startsWith('/api') || req.path.startsWith('/open')) {