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

Forced use of the protocol specific URL in WC bootstrap handler breaks loading in some scenarios #13315

Open
paulroemer opened this issue Mar 18, 2022 · 2 comments

Comments

@paulroemer
Copy link
Contributor

Description of the bug

Using an embeddable Vaadin component (WC exporter) deployed on a proxied https host in a non-http hosted static HTML page fails due to the forced rewrite of the given URL.

Code where the rewrite happens:
https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/server/communication/WebComponentBootstrapHandler.java#L541

Scenario: We have deployed the embeddable component on https://exported.wc/ and want to use it locally for development on http://localhost/. The request is https://exported.wc/embeddable/web-component/web-component-bootstrap.js?url=https://exported.wc/embeddable/web-component/web-component-bootstrap.js. But because of the rewrite of the URL, the resolved URL is //exported.wc/embeddable/web-component/web-component-bootstrap.js.

All of that wouldn't be bad (http://exported.wc/ is 301 redirected to https://) if CORS wouldn't block the redirect response.

Expected behavior

Do not rewrite the URL at all. Actually, I am not sure what this rewrite should fix.

Minimal reproducible example

Versions

Vaadin 22

@caalador
Copy link
Contributor

I could by searching history find the change as #5374
@Artur- would you remember anything about this change?

@mshabarov
Copy link
Contributor

Not sure if it's a bug or enhancement, IMO something in the middle.
@paulroemer to help us investigate this issue, could you please provide an example to reproduce or steps how to reproduce it, desirably with description how to set up the local environment for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Normal Priority (P2)
Development

No branches or pull requests

3 participants