Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nginx-proxy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
nginx-proxy
Commits
5eba5882
Commit
5eba5882
authored
Jul 07, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add HTTP_EXTRA_PRE and NGINX_EXTRA_PRE
parent
031392ce
Pipeline
#38613
failed with stages
in 58 minutes and 4 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
4 deletions
+18
-4
README.md
README.md
+2
-0
src/site.ts
src/site.ts
+4
-0
views/nginx.conf.mustache
views/nginx.conf.mustache
+12
-4
No files found.
README.md
View file @
5eba5882
...
@@ -60,3 +60,5 @@ Use `SITE_mycard.moe: redirect+https://example.com`.
...
@@ -60,3 +60,5 @@ Use `SITE_mycard.moe: redirect+https://example.com`.
-
`LIMIT_RATE`
`LIMIT_BURST`
`MAX_CACHE_SIZE`
in original format. eg.
`LIMIT_RATE=10m`
-
`LIMIT_RATE`
`LIMIT_BURST`
`MAX_CACHE_SIZE`
in original format. eg.
`LIMIT_RATE=10m`
-
`HTTP_EXTRA`
Extra entry in
`http`
section.
-
`HTTP_EXTRA`
Extra entry in
`http`
section.
-
`NGINX_EXTRA`
Extra entry in
`nginx.conf`
section.
-
`NGINX_EXTRA`
Extra entry in
`nginx.conf`
section.
-
`HTTP_EXTRA_PRE`
Extra entry in
`http`
section, before every sites.
-
`NGINX_EXTRA_PRE`
Extra entry in
`nginx.conf`
section, before
`http`
section.
src/site.ts
View file @
5eba5882
...
@@ -86,6 +86,8 @@ export interface RenderData {
...
@@ -86,6 +86,8 @@ export interface RenderData {
upstreams
:
Upstream
[];
upstreams
:
Upstream
[];
httpExtra
?:
string
[];
httpExtra
?:
string
[];
nginxExtra
?:
string
[];
nginxExtra
?:
string
[];
httpExtraPre
?:
string
[];
nginxExtraPre
?:
string
[];
}
}
export
interface
Upstream
{
export
interface
Upstream
{
...
@@ -248,5 +250,7 @@ export async function getData(
...
@@ -248,5 +250,7 @@ export async function getData(
upstreams
,
upstreams
,
httpExtra
:
parser
.
getArray
(
'
HTTP_EXTRA
'
),
httpExtra
:
parser
.
getArray
(
'
HTTP_EXTRA
'
),
nginxExtra
:
parser
.
getArray
(
'
NGINX_EXTRA
'
),
nginxExtra
:
parser
.
getArray
(
'
NGINX_EXTRA
'
),
httpExtraPre
:
parser
.
getArray
(
'
HTTP_EXTRA_PRE
'
),
nginxExtraPre
:
parser
.
getArray
(
'
NGINX_EXTRA_PRE
'
),
};
};
}
}
views/nginx.conf.mustache
View file @
5eba5882
...
@@ -8,6 +8,10 @@ events {
...
@@ -8,6 +8,10 @@ events {
# multi_accept on;
# multi_accept on;
}
}
{{#
nginxExtraPre
}}
{{
.
}}
{{/
nginxExtraPre
}}
http {
http {
##
##
...
@@ -140,6 +144,10 @@ http {
...
@@ -140,6 +144,10 @@ http {
limit_rate
{{
.
}}
;
limit_rate
{{
.
}}
;
{{/
limitRate
}}
{{/
limitRate
}}
{{#
httpExtraPre
}}
{{
.
}}
{{/
httpExtraPre
}}
##
##
# Upstreams
# Upstreams
##
##
...
@@ -312,11 +320,11 @@ http {
...
@@ -312,11 +320,11 @@ http {
}
}
{{/
sites
}}
{{/
sites
}}
include /etc/nginx/conf.d/*.conf;
{{#
httpExtra
}}
{{
.
}}
{{/
httpExtra
}}
{{#
httpExtra
}}
include /etc/nginx/conf.d/*.conf;
{{
.
}}
{{/
httpExtra
}}
}
}
stream {
stream {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment