-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: skip content negotiation for health check endpoint
- Update content negotiation middleware to properly detect health check path - Add proper type safety to MediaTypeObject with enum validation - Handle health check responses in SetResponseMediaType interceptor - Add fallback content-type header for health endpoints - Fix TypeScript type mismatch errors in middleware The health check endpoint now bypasses TAXII content negotiation requirements while maintaining proper type safety throughout the rest of the API.
- Loading branch information
Showing
5 changed files
with
96 additions
and
93 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
meta { | ||
name: Health Ping | ||
type: http | ||
seq: 9 | ||
} | ||
|
||
get { | ||
url: {{host}}/health/ping | ||
body: none | ||
auth: none | ||
} | ||
|
||
tests { | ||
test("Verify response status code", function() { | ||
expect(res.getStatus()).to.equal(204); | ||
}); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
headers { | ||
Accept: application/taxii+json;version=2.1 | ||
~Accept: application/taxii+json;version=2.1 | ||
} |
This file contains 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
This file contains 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
This file contains 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