Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance the functionality related to PING_URL #164

Closed
ttionya opened this issue Sep 3, 2024 · 0 comments · Fixed by #165
Closed

Enhance the functionality related to PING_URL #164

ttionya opened this issue Sep 3, 2024 · 0 comments · Fixed by #165
Labels
enhancement New feature or request type: notification

Comments

@ttionya
Copy link
Owner

ttionya commented Sep 3, 2024

The current PING_URL functionality is very limited, as it only supports the simplest GET requests. To better adapt to the invocation methods of notification and health check tools available in the market, the following features will be added:

  1. Add environment variables for attaching curl options to PING_URL, PING_URL_WHEN_START, PING_URL_WHEN_SUCCESS, and PING_URL_WHEN_FAILURE. These will be named by appending the _CURL_OPTIONS suffix. For example, the PING_URL_CURL_OPTIONS environment variable will allow attaching curl options to PING_URL.

  2. Add placeholders for replacing the actual title and content for the eight environment variables mentioned in the first point. The placeholder for the subject is %{subject}, and for the content, it is %{content}. Note that the title and content may contain spaces. For the four environment variables that include _CURL_OPTIONS, the placeholders will be replaced directly, preserving spaces. For the other PING_URL environment variables, spaces will be replaced with + to comply with URL rules.

The planned request command is curl ${PING_URL_CURL_OPTIONS} ${PING_URL}.

Related #161

@ttionya ttionya added enhancement New feature or request type: notification labels Sep 3, 2024
@ttionya ttionya linked a pull request Sep 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request type: notification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant