Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0b0869a4
authored
2026-03-12 16:19:10 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
先去掉自定义appkey
1 parent
3233b39b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
Dockerfile
default.conf
Dockerfile
View file @
0b0869a
...
...
@@ -11,4 +11,4 @@ RUN chown -R nginx:nginx /usr/share/nginx/html
EXPOSE
29900
#CMD:指定容器启动时要运行的命令
CMD
["nginx", "-g", "daemon off;"]
CMD
envsubst '${API_BASE_URL}' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'
#
CMD envsubst '${API_BASE_URL}' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'
...
...
default.conf
View file @
0b0869a
...
...
@@ -37,12 +37,12 @@ server {
}
# 专门处理 config.json 的 location
location
= /
config
.
json
{
# 启用 sub_filter 并指定 MIME 类型为 application/json
sub_filter
'{{{API_BASE_URL}}}'
'${API_BASE_URL}'
;
sub_filter_once
off
;
sub_filter_types
application
/
json
;
# 关键:允许替换 JSON 类型
}
#
location = /config.json {
#
# 启用 sub_filter 并指定 MIME 类型为 application/json
#
sub_filter '{{{API_BASE_URL}}}' '${API_BASE_URL}';
#
sub_filter_once off;
#
sub_filter_types application/json; # 关键:允许替换 JSON 类型
#
}
error_page
500
502
503
504
/
50
x
.
html
;
location
= /
50
x
.
html
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment