Notifications from inside of Docker container


Krzaku

Recommended Posts

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?

Link to comment
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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.