diff --git a/docker/Dockerfile b/docker/Dockerfile index cb280939..d80e1a05 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,5 +10,5 @@ ARG URL_DIR= COPY ${DIST_DIR} /var/www/html/${URL_DIR} RUN sed -i "s/\ \/index.html/\ \/${URL_DIR}\/index.html/g" /etc/nginx/conf.d/default.conf # 默认不建议使用自定义nginx配置,如必须使用,请提前沟通 -# COPY ./nginx.conf /etc/nginx/conf.d/default.conf -EXPOSE 80 \ No newline at end of file +COPY ./default.conf /etc/nginx/conf.d/default.conf +EXPOSE 80 diff --git a/docker/default.conf b/docker/default.conf index f2b8d513..a6e87f1a 100644 --- a/docker/default.conf +++ b/docker/default.conf @@ -5,6 +5,11 @@ server { #charset koi8-r; #access_log /var/log/nginx/host.access.log main; + # 跳转到伊利GPT + location /yiligpt { + return 302 https://yiligpt.x.digitalyili.com/aiagent/assistant/78907182-cc42-4072-abae-86ef67c1ecd3/share; + } + location / { root /var/www/html; index index.html index.htm; @@ -18,4 +23,4 @@ server { root /var/www/html; } -} \ No newline at end of file +} diff --git a/vue.config.js b/vue.config.js index f243dd1e..702f5d2f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,7 +3,7 @@ const Components = require('unplugin-vue-components/webpack'); const { ElementPlusResolver } = require('unplugin-vue-components/resolvers'); const MomentLocalesPlugin = require('moment-locales-webpack-plugin'); const LodashModuleReplacementPlugin = require("lodash-webpack-plugin"); -const { proxyUrl, proxyUrlDelivery } = require('./src/config'); +const { proxyUrl, proxyUrlDelivery,aiAssistantUrl } = require('./src/config'); const { baseOss } = require('./src/config'); const path = require('path'); @@ -33,6 +33,13 @@ module.exports = { }, cookieDomainRewrite: 'localhost', }, + '/yiligpt': { + target: `${ aiAssistantUrl }`, + changeOrigin: true, + pathRewrite: { + '^/yiligpt': '', // 路径重写 + }, + }, // '/daixin': { // target: proxyUrlMessageCenter, // changeOrigin: false,