mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00

This patch adds a reverse proxy in front of novnc and playwright server inside the container. As a result: - container exposes a single HTTP port to the host - all Playwright clients can connect using this exposed port, e.g. `http://127.0.0.1:5400` - navigating to the exposed port in the browser lands on a nice HTML page with a link to view container screen - users can also manually navigate to `http://127.0.0.1:5400/screen` to view screen
36 lines
1.2 KiB
HTML
36 lines
1.2 KiB
HTML
<!DOCTYPE HTML>
|
|
<style>
|
|
:root {
|
|
--monospace: Consolas, Menlo, monospace;
|
|
--regular: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Fira Sans, sans-serif;
|
|
--text-color: #24292e;
|
|
--background-color: #fff;
|
|
--link-color: #0366d6;
|
|
--border-color: #f3e5f5;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
font: 1em/1.6 var(--regular);
|
|
font-weight: 400;
|
|
font-style: normal;
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
color: var(--text-color);
|
|
font-size: 12px;
|
|
}
|
|
img, iframe { border: none }
|
|
h1,h2,h3,h4,h5,h6 {margin: 0.6em 0; font-weight: normal}
|
|
h1 {font-size: 2.625em; line-height: 1.2}
|
|
h2 {font-size: 1.625em; line-height: 1.2}
|
|
h3 {font-size: 1.3125em;line-height: 1.24}
|
|
h4 {font-size: 1.1875em;line-height: 1.23}
|
|
h5,h6 {font-size: 1em; font-weight:bold}
|
|
a { color: var(--link-color); text-decoration: none; }
|
|
hbox { display: flex; align-items: center; }
|
|
vbox { display: flex; flex-direction: column; }
|
|
</style>
|
|
<body style='display: flex; align-items: center; justify-content: center; flex-direction: column;'>
|
|
<h1>Playwright Container</h1>
|
|
<a href="/screen">View Screen</a>
|
|
</body>
|