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

Unable to set cookies when receiving websocket connection #2565

Closed
lfmunoz opened this issue Feb 2, 2024 · 1 comment
Closed

Unable to set cookies when receiving websocket connection #2565

lfmunoz opened this issue Feb 2, 2024 · 1 comment
Labels

Comments

@lfmunoz
Copy link

lfmunoz commented Feb 2, 2024

Unable to set cookies when receiving websocket connection

There should be a way to set cookies before doing the websocket upgrade.

ServerWebSocket.headers is available to read cookie. But it is not possible to set it?

Tried creating a router:

        // HTTP CONFIGURATION
        router = Router.router(vertx)
        router.route().handler(::requestInterceptor)

requestInterceptor is never triggered.

@tsegismont
Copy link
Contributor

If you implement a route handler like this:

  @Override
  public void handle(RoutingContext rc) {
    rc.addHeadersEndHandler(v -> rc.response().addCookie(myCookie));
    rc.next();
  }

The set-cookie header should be sent

@tsegismont tsegismont closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants