mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-04 11:52:53 +02:00
integration: add cluster setup and configuration and a few tests
This commit is contained in:
parent
9860c3ce9f
commit
8fd716e1d8
24 changed files with 1689 additions and 2 deletions
29
integration/backends/httpdetails/index.js
Normal file
29
integration/backends/httpdetails/index.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
const http = require("http");
|
||||
|
||||
const requestListener = function (req, res) {
|
||||
const {
|
||||
pathname: path,
|
||||
hostname: host,
|
||||
port: port,
|
||||
search: query,
|
||||
hash: hash,
|
||||
} = new URL(req.url, `http://${req.headers.host}`);
|
||||
|
||||
res.setHeader("Content-Type", "application/json");
|
||||
res.writeHead(200);
|
||||
res.end(
|
||||
JSON.stringify({
|
||||
headers: req.headers,
|
||||
method: req.method,
|
||||
host: host,
|
||||
port: port,
|
||||
path: path,
|
||||
query: query,
|
||||
hash: hash,
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const server = http.createServer(requestListener);
|
||||
console.log("starting http server on :8080");
|
||||
server.listen(8080);
|
Loading…
Add table
Add a link
Reference in a new issue