localhost : 9000에서 호스팅되는 Node.js (AngularJS 앱) 애플리케이션이 있습니다. 또 다른 부분 (기존의 GWT superdev 모드 - JeTTy)은 localhost : 8888에서 호스팅됩니다.http-proxy-middleware : localhost : 9000을 localhost : 8888로 nodejs에서 JettY로 리디렉션 할 수 없음
localhost : 9000 (NodeJS)에 들어오는 모든 것이 다음과 같은 사양의 localhost : 8888 (JeTTy)로 리디렉션되도록 http-proxy-middleware를 구성하고 싶습니다. (응용 프로그램에는 3 개의 끝점이 있습니다) :
var proxy = proxyMiddleware(['/product', '/admin', '/servlets'], { target: 'http://127.0.0.1:8888', changeOrigin: true, xfwd: true }); var app = connect(); app.use(proxy);
을 다음과 같이 프록시가있다 : 다음
https://localhost:9000/product -> http://127.0.0.1:8888/product https://localhost:9000/servlets/my_servlet1 -> http://127.0.0.1:8888/servlets/my_servlet1 https://localhost:9000/admin -> http://127.0.0.1:8888/admin
## node scripts/serve.js [HPM] Proxy created: [ '/product, '/admin', '/servlets' ] -> http://127.0.0.1:8888 listening on port 9000 https://localhost:9000, 엔드 포인트 http로 실패
는 지금은 액세스 (9000 로컬 호스트를 통해) : 노력하고 있어요 500 오류 : 여기
Request URL:https://localhost:9000/servlets/my_servlet1 Request Method:POST Status Code:500 protocol = https host = null Remote Address:[::1]:9000 HTTP ERROR 500 Problem accessing /servlets/my_servlet1. Reason: protocol = https host = null Powered by Jetty://
를 놓치고 무엇을? 고급의
감사합니다,
Pradip
'https : // localhost : 9000'인가 아니면'http : // localhost : 9000'인가? – kensplanet