Repository navigation
[Synthetics] http monitors - account for custom Content-Type headers - #159737
Merged
shahzad31 merged 2 commits intoJun 19, 2023
Merged
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
dominiqueclarke
marked this pull request as ready for review
June 15, 2023 14:54
Contributor
|
Pinging @elastic/uptime (Team:uptime) |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jun 19, 2023
…lastic#159737) (cherry picked from commit fc32999)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Jun 19, 2023
…aders (#159737) (#159918) # Backport This will backport the following commits from `main` to `8.8`: - [[Synthetics] http monitors - account for custom Content-Type headers (#159737)](#159737) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Dominique Clarke","email":"dominique.clarke@elastic.co"},"sourceCommit":{"committedDate":"2023-06-19T11:49:55Z","message":"[Synthetics] http monitors - account for custom Content-Type headers (#159737)","sha":"fc32999c91760ed399b872d507fd84d308f5829e","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:uptime","v8.9.0","v8.8.2"],"number":159737,"url":"https://github.com/elastic/kibana/pull/159737","mergeCommit":{"message":"[Synthetics] http monitors - account for custom Content-Type headers (#159737)","sha":"fc32999c91760ed399b872d507fd84d308f5829e"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159737","number":159737,"mergeCommit":{"message":"[Synthetics] http monitors - account for custom Content-Type headers (#159737)","sha":"fc32999c91760ed399b872d507fd84d308f5829e"}},{"branch":"8.8","label":"v8.8.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
Contributor
|
Post-FF Testing LGTM! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release note
Ensures that users can configure custom
Content-Typeheaders for HTTP monitors in the Synthetics app.Summary
This PR fixes two bugs identified by an SDH.
Content-Typeheaders to the monitor payload based on the MIME type of the request body. We were doing so in Uptime, but have not been in the Synthetics app. This PR ensures the defaultContent-Typeheader is applied for UI monitorsContent-Typeheaders, they were being removed on subsequent monitor edits. This PR ensures that they are preservedTesting
check.request.headersvalue is set toContent-Type: 'text/plain.check.request.headersvalue is set toContent-Type: 'application/json'Content-Typein the request headers section. For example, you can just useContent-Type: custom. Make sure you set the request headers, not the response headers or proxy headers.Content-Type: customheader is present incheck.request.headers.Content-Typeheader remains in the UI edit flow. Save the monitor.Content-Type: customheader still remains incheck.request.headers.