I am setting up an express server with http-proxy-middleware. When requesting from the proxy, the request goes on until it finally times out.
The URL I try to proxy is https://www.pegelonline.wsv.de/, especially a WFS it provides. I've read the docs, and the TL;DR seems to apply for my case since I don't aim to do anything special that's listed. I've also tried the shorthand.
https://github.com/chimurai/http-proxy-middleware#tldr
Minimal example:
https://github.com/isthisstackoverflow/repro-waterlevel
const proxy = require('http-proxy-middleware')
const express = require('express')
const app = express()
const port = 9004
app.use(
'/',
proxy({
target: 'https://www.pegelonline.wsv.de/',
changeOrigin: true
})
)
app.listen(port)
^ Result is as expected.
^ Timeout eventually.
Update
I figure the problem is me trying to proxy https to http. I don't know what exactly the problem was and no longer need to do this, though.