Skip to content

Commit 46873c4

Browse files
authored
Update nginx_proxy_manager_cli.sh
Update expiry in code changing from NPM - expiry has to be passed in as a query param instead of request body. https://github.com/NginxProxyManager/nginx-proxy-manager/blob/develop/backend/routes/tokens.js#L28 NginxProxyManager/nginx-proxy-manager#3417 (comment)
1 parent c59c578 commit 46873c4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

nginx_proxy_manager_cli.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Github [ https://github.com/Erreur32/nginx-proxy-manager-Bash-API ]
55
# Erreur32 July 2024
66

7-
VERSION="2.5.4"
7+
VERSION="2.5.5"
88

99
#
1010
# This script allows you to manage Nginx Proxy Manager via the API. It provides
@@ -392,9 +392,13 @@ colorize_booleanh() {
392392
################################
393393
# Generate a new API token
394394
generate_token() {
395-
response=$(curl -s -X POST "$BASE_URL$API_ENDPOINT" \
395+
response=$(curl -s -X POST "$BASE_URL$API_ENDPOINT?expiry=$TOKEN_EXPIRY" \
396396
-H "Content-Type: application/json; charset=UTF-8" \
397397
--data-raw "{\"identity\":\"$API_USER\",\"secret\":\"$API_PASS\"}")
398+
399+
# response=$(curl -s -X POST "$BASE_URL$API_ENDPOINT" \
400+
# -H "Content-Type: application/json; charset=UTF-8" \
401+
# --data-raw "{\"identity\":\"$API_USER\",\"secret\":\"$API_PASS\"}")
398402
#--data-raw "{\"identity\":\"$API_USER\",\"secret\":\"$API_PASS\",\"expiry\":\"$TOKEN_EXPIRY\"}")
399403

400404
token=$(echo "$response" | jq -r '.token')

0 commit comments

Comments
 (0)