-
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: paschaef <[email protected]> Signed-off-by: nachoparker <[email protected]>
- Loading branch information
1 parent
4a51c1f
commit 9304c86
Showing
3 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
# Manually add trusted proxies in NextCloudPi | ||
# | ||
# Copyleft 2019 by Pascal Haefliger <45995338+paschaef_a_t_users_d_o_t_noreply_d_o_tgithub_d_o_t_com> | ||
# GPL licensed (see end of file) * Use at your own risk! | ||
# | ||
# | ||
|
||
configure() | ||
{ | ||
[[ "$PROXY1" != "" ]] && ncc config:system:set trusted_proxies 0 --value="$PROXY1" | ||
[[ "$PROXY2" != "" ]] && ncc config:system:set trusted_proxies 1 --value="$PROXY2" | ||
[[ "$PROXY3" != "" ]] && ncc config:system:set trusted_proxies 2 --value="$PROXY3" | ||
|
||
exit 0 | ||
} | ||
|
||
install(){ :; } | ||
|
||
# License | ||
# | ||
# This script is free software; you can redistribute it and/or modify it | ||
# under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This script is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this script; if not, write to the | ||
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, | ||
# Boston, MA 02111-1307 USA | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"id": "nc-trusted-proxies", | ||
"name": "Nc-trusted-proxies", | ||
"title": "nc-trusted-proxies", | ||
"description": "Manually add trusted proxies", | ||
"info": "This operation is only needed if NCP is running behind a reverse proxy and the true client IP address is needed", | ||
"infotitle": "", | ||
"params": [ | ||
{ | ||
"id": "PROXY1", | ||
"name": "Trusted Proxy #1", | ||
"value": "", | ||
"suggest": "my.proxy.com" | ||
}, | ||
{ | ||
"id": "PROXY2", | ||
"name": "Trusted Proxy #2", | ||
"value": "", | ||
"suggest": "other.proxy.com" | ||
}, | ||
{ | ||
"id": "PROXY3", | ||
"name": "Trusted Proxy #3", | ||
"value": "", | ||
"suggest": "172.0.0.1" | ||
} | ||
] | ||
} |