Krzaku Posted March 4, 2017 Share Posted March 4, 2017 In my Docker container I would like to send notifications using built-in webGui notification system. To do this I'm making a POST request to "http://tower/webGui/include/Notify.php", but the problem is I need to include the "csrf_token" variable with every request. Is there a way to retrieve that variable from inside of the container so it doesn't need to be manually entered using env variables? Quote Link to comment
Squid Posted March 4, 2017 Share Posted March 4, 2017 1 hour ago, Krzaku said: In my Docker container I would like to send notifications using built-in webGui notification system. To do this I'm making a POST request to "http://tower/webGui/include/Notify.php", but the problem is I need to include the "csrf_token" variable with every request. Is there a way to retrieve that variable from inside of the container so it doesn't need to be manually entered using env variables? You're going to be better off mapping the folder /usr/local/emhttp/plugins/dynamix/scripts inside the container, and then calling the notify script manually Your container won't be able to determine the csrf_token, and the value changes with every reboot, so an environment variable won't work either. Quote Link to comment
Krzaku Posted March 4, 2017 Author Share Posted March 4, 2017 Mapping this single folder would not work, would it? It requires some other scripts and configs, and also requires a php interpreter to be installed in the container. Quote Link to comment
Squid Posted March 5, 2017 Share Posted March 5, 2017 You can get the csrf from the var.ini file on tapatalk at the moment so can't give you the exact folder thoughSent from my SM-T560NU using Tapatalk Quote Link to comment
Krzaku Posted March 7, 2017 Author Share Posted March 7, 2017 (edited) I decided to not include notifications in my script as I don't think it's a good idea to pass the root password to Docker containers via env variables. Thanks for your help anyway. Edited March 7, 2017 by Krzaku Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.