mirror of
https://github.com/hassio-addons/addon-grocy.git
synced 2025-05-04 19:21:24 +00:00
Added ingress user support
This commit is contained in:
parent
c624f64912
commit
00d82855d5
4 changed files with 16 additions and 0 deletions
|
@ -202,6 +202,12 @@ equal Sunday:
|
|||
- `calendar_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
|
||||
|
||||
- Grocy support to provide custom lookup resources to lookup information
|
||||
|
|
|
@ -46,6 +46,7 @@ options:
|
|||
ssl: true
|
||||
certfile: fullchain.pem
|
||||
keyfile: privkey.pem
|
||||
grocy_ingress_user: ""
|
||||
schema:
|
||||
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)
|
||||
|
@ -74,3 +75,4 @@ schema:
|
|||
ssl: bool
|
||||
certfile: str
|
||||
keyfile: str
|
||||
grocy_ingress_user: str
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
# Generate Ingress PHP-FPM configuration
|
||||
bashio::var.json \
|
||||
interface "$(bashio::addon.ip_address)" \
|
||||
grocy_user "$(bashio::config 'grocy_ingress_user')" \
|
||||
| tempio \
|
||||
-template /etc/nginx/templates/ingress.gtpl \
|
||||
-out /etc/nginx/servers/ingress.conf
|
||||
|
|
|
@ -11,6 +11,13 @@ server {
|
|||
fastcgi_read_timeout 900;
|
||||
fastcgi_split_path_info ^(.+\.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;
|
||||
include /etc/nginx/includes/fastcgi_params.conf;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue