add config/scripts/refresh-token.js
This commit is contained in:
parent
8ada0928b0
commit
77e7be5913
@ -54,6 +54,11 @@ server {
|
||||
proxy_set_header refresh-token $REFRESH_TOKEN;
|
||||
}
|
||||
|
||||
location /scripts/ {
|
||||
alias /etc/nginx/scripts/;
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://app;
|
||||
|
||||
|
||||
9
config/scripts/refresh-token.js
Normal file
9
config/scripts/refresh-token.js
Normal file
@ -0,0 +1,9 @@
|
||||
function refreshToken() {
|
||||
fetch('/refresh-token')
|
||||
.then(response => response.json())
|
||||
.then(data => console.log(data));
|
||||
}
|
||||
|
||||
(function () {
|
||||
setInterval(refreshToken, 59 * 60 * 1000); // 59 minutes
|
||||
})();
|
||||
@ -13,6 +13,7 @@ services:
|
||||
- ./config/nginx.auth.conf:/etc/nginx/templates/default.conf.template
|
||||
- ./config/include:/etc/nginx/include
|
||||
- ./config/http/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./config/scripts:/etc/nginx/scripts
|
||||
restart: always
|
||||
networks:
|
||||
- auth_network
|
||||
|
||||
@ -14,6 +14,7 @@ services:
|
||||
- ./config/nginx.auth.conf:/etc/nginx/templates/default.conf.template
|
||||
- ./config/include:/etc/nginx/include
|
||||
- ./config/http/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./config/scripts:/etc/nginx/scripts
|
||||
restart: always
|
||||
networks:
|
||||
- auth_network
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user