Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Exposed query id and HTTP TRACE #80

Merged
merged 9 commits into from
Mar 4, 2024
Merged

Exposed query id and HTTP TRACE #80

merged 9 commits into from
Mar 4, 2024

Conversation

RasonJ
Copy link
Collaborator

@RasonJ RasonJ commented Mar 3, 2024

Added Access-Control-Expose-Headers header to allow query_id to get past CORS restrictions.
Testing can be done with https://github.com/o19s/ubi_playground/blob/main/tools/stub/cors_test.html.

I'm also leaving in the HTTP TRACE verb so that we can do testing without breaking anything else in the plugin.

@RasonJ RasonJ requested a review from jzonthemtn March 4, 2024 16:12
RasonJ added 2 commits March 4, 2024 08:32
…earch-ubi into REST/exposed-query_id

# Conflicts:
#	src/main/java/org/opensearch/ubi/action/UserBehaviorInsightsActionFilter.java
http.cors.allow-credentials: true
# TODO: add REST headers required here
http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This docker compose is only for building and testing this plugin, so we should only added things that it requires.

@@ -106,10 +110,13 @@ public void onResponse(Response response) {
LOGGER.error("Unable to persist query.", ex);
}

LOGGER.info("######### Setting and exposing query_id {}", queryId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow along the other other patterns...

@jzonthemtn jzonthemtn merged commit f49fb9a into main Mar 4, 2024
1 check passed
@jzonthemtn jzonthemtn deleted the REST/exposed-query_id branch March 4, 2024 19:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants