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

Fix config editor when using HTTPS #29586

Merged
merged 1 commit into from
Dec 1, 2022
Merged

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Nov 30, 2022

Fixes #29431

This is a workaround though. The core of the problem is that when in HTTPS, event.request().absoluteURI() returns an HTTP url, which is wrong and leads to the redirect not working.

/cc @cescoffier

Fixes quarkusio#29431

This is a workaround though. The core of the problem is that when in
HTTPS, event.request().absoluteURI() returns an HTTP url, which is wrong
and leads to the redirect not working.
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 30, 2022

Failing Jobs - Building e2572f4

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 17 Build Failures Logs Raw logs
JVM Tests - JDK 17 MacOS M1 Set up runner ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 18

Full information is available in the Build summary check run.

Failures

⚙️ JVM Tests - JDK 17 #

- Failing: integration-tests/kafka-sasl 

📦 integration-tests/kafka-sasl

io.quarkus.it.kafka.SaslKafkaConsumerTest.testReception - More details - Source on GitHub

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at io.quarkus.test.junit.QuarkusTestExtension.throwBootFailureException(QuarkusTestExtension.java:625)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestClassConstructor(QuarkusTestExtension.java:696)

@cescoffier
Copy link
Member

@gsmet Can you open an issue about the "event.request().absoluteURI() returns an HTTP url, which is wrong and leads to the redirect not working."

It's definitely a bug. The Vert.x logic is handling HTTPS correctly:

static String absoluteURI(String serverOrigin, HttpServerRequest req) throws URISyntaxException {
    String absoluteURI;
    URI uri = new URI(req.uri());
    String scheme = uri.getScheme();
    if (scheme != null && (scheme.equals("http") || scheme.equals("https"))) {
      absoluteURI = uri.toString();
    } else {
      String host = req.host();
      if (host != null) {
        absoluteURI = req.scheme() + "://" + host + uri;
      } else {
        // Fall back to the server origin
        absoluteURI = serverOrigin + uri;
      }
    }
    return absoluteURI;
  }

However, in the ForwardParser we have in Quarkus, things are a bit unclear. I need to have a deeper look.

@cescoffier cescoffier added the kind/bug Something isn't working label Dec 1, 2022
@cescoffier cescoffier merged commit 46148ff into quarkusio:main Dec 1, 2022
@quarkus-bot quarkus-bot bot added this to the 2.16 - main milestone Dec 1, 2022
@cescoffier cescoffier removed the kind/bug Something isn't working label Dec 1, 2022
@gsmet
Copy link
Member Author

gsmet commented Dec 1, 2022

I created #29612 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DevUI - config editor doesn't work well over https, UI doesn't get updated
2 participants