Skip to content

Commit 21603f4

Browse files
joguclaude
andcommitted
fix: prevent duplicate x-fapi-interaction-id header
FapiInteractionIdResponseFilter now skips responses that already contain the header, avoiding duplication with OBB endpoints that set it manually via ObbUtils. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b99f2ac commit 21603f4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/main/java/com/authlete/jaxrs/server/decorator/FapiInteractionIdResponseFilter.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ public void filter(
5050
ContainerRequestContext requestContext,
5151
ContainerResponseContext responseContext) throws IOException
5252
{
53+
// If the response already contains the x-fapi-interaction-id HTTP header
54+
// (e.g., set by an endpoint such as the OBB endpoints), do nothing.
55+
if (responseContext.getHeaders().containsKey(CustomHttpHeaders.X_FAPI_INTERACTION_ID))
56+
{
57+
return;
58+
}
59+
5360
// The value of the x-fapi-interaction-id HTTP header in the HTTP request.
5461
String interactionId = RequestUtility.extractFapiInteractionId(requestContext);
5562

0 commit comments

Comments
 (0)