mirror of
https://github.com/hassio-addons/addon-grocy.git
synced 2025-05-04 11:11:30 +00:00
✨ Add ingress user support (#286)
Co-authored-by: Oliver Felkel <oliver.felkel@uni-ulm.de>
This commit is contained in:
parent
c624f64912
commit
eb098c94d8
4 changed files with 16 additions and 0 deletions
|
@ -202,6 +202,12 @@ equal Sunday:
|
||||||
- `calendar_first_day_of_week`
|
- `calendar_first_day_of_week`
|
||||||
- `meal_plan_first_day_of_week`
|
- `meal_plan_first_day_of_week`
|
||||||
|
|
||||||
|
### Option: `grocy_ingress_user`
|
||||||
|
|
||||||
|
Allows you to specify a default ingress user if desired (e.g. `admin`).
|
||||||
|
|
||||||
|
If no ingress user is set, the default login authentication is used.
|
||||||
|
|
||||||
## Known issues and limitations
|
## Known issues and limitations
|
||||||
|
|
||||||
- Grocy support to provide custom lookup resources to lookup information
|
- Grocy support to provide custom lookup resources to lookup information
|
||||||
|
|
|
@ -46,6 +46,7 @@ options:
|
||||||
ssl: true
|
ssl: true
|
||||||
certfile: fullchain.pem
|
certfile: fullchain.pem
|
||||||
keyfile: privkey.pem
|
keyfile: privkey.pem
|
||||||
|
grocy_ingress_user: ""
|
||||||
schema:
|
schema:
|
||||||
log_level: list(trace|debug|info|notice|warning|error|fatal)?
|
log_level: list(trace|debug|info|notice|warning|error|fatal)?
|
||||||
culture: list(ca|cs|da|de|el_GR|en|en_GB|es|fi|fr|he_IL|hu|it|ja|ko_KR|nl|no|pl|pt_BR|pt_PT|ru|sk_SK|sv_SE|ta|tr|zh_CN|zh_TW)
|
culture: list(ca|cs|da|de|el_GR|en|en_GB|es|fi|fr|he_IL|hu|it|ja|ko_KR|nl|no|pl|pt_BR|pt_PT|ru|sk_SK|sv_SE|ta|tr|zh_CN|zh_TW)
|
||||||
|
@ -74,3 +75,4 @@ schema:
|
||||||
ssl: bool
|
ssl: bool
|
||||||
certfile: str
|
certfile: str
|
||||||
keyfile: str
|
keyfile: str
|
||||||
|
grocy_ingress_user: str
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
# Generate Ingress PHP-FPM configuration
|
# Generate Ingress PHP-FPM configuration
|
||||||
bashio::var.json \
|
bashio::var.json \
|
||||||
interface "$(bashio::addon.ip_address)" \
|
interface "$(bashio::addon.ip_address)" \
|
||||||
|
grocy_user "$(bashio::config 'grocy_ingress_user')" \
|
||||||
| tempio \
|
| tempio \
|
||||||
-template /etc/nginx/templates/ingress.gtpl \
|
-template /etc/nginx/templates/ingress.gtpl \
|
||||||
-out /etc/nginx/servers/ingress.conf
|
-out /etc/nginx/servers/ingress.conf
|
||||||
|
|
|
@ -11,6 +11,13 @@ server {
|
||||||
fastcgi_read_timeout 900;
|
fastcgi_read_timeout 900;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
|
||||||
|
{{ if .grocy_user }}
|
||||||
|
fastcgi_param GROCY_AUTH_CLASS "Grocy\Middleware\ReverseProxyAuthMiddleware";
|
||||||
|
fastcgi_param GROCY_REVERSE_PROXY_AUTH_HEADER REMOTE_USER;
|
||||||
|
fastcgi_param HTTP_REMOTE_USER {{ .grocy_user }};
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
include /etc/nginx/includes/fastcgi_params.conf;
|
include /etc/nginx/includes/fastcgi_params.conf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue