Is an Http2 Cross-origin push request possible?

Let's say I have a server that serves the HTML file in url https://example.com/, and this applies to the css file in url https://test.com/mystyles.css. Is it possible to click a file mystyles.cssalong with html content as part of an HTTP2 connection so that the browser uses this css content?

I tried to create such a request using a self-signed certificate on my localhost (and I previously created a security exception for both hosts in my browser), sending an html file when the request arrives at http://localhost/, and pressing css with a different name / port in the header :authorityor Host. However, with a full-page CSS update, the file is retrieved in a separate request from the server, and not using the pushed css file.

See this option for the file that I used to verify this. If I am http://localhost:8080/, then the text will be red, but if I am in http://test:8080/, it will be green, implying that the clicked content is used if the source matches.

Is there a combination of headers you need to use for this? Perhaps CORS is being called?

+4
source share

All Articles