2017-05-05 7 views
0

私の「http://localhost:3000/api/」のパスを、Apacheサーバで動作する「http://example.com/api/」にリダイレクトしようとしています。Webpack Dev Serverプロキシがapiバックエンドにリダイレクトしない

私devServerの設定があります:

devServer: { 
    publicPath: '/build/', 
    port: 3000, 
    proxy: { 
     '/api': { 
      target: 'http://gestios.loc/api' 
     } 
    }, 
    historyApiFallback: true 
} 

私はレシーブ404エラーでhttp://localhost:3000/api/calltek/apps?permalink=empresasにアクセスしようとします。

Request URL:http://localhost:3000/api/calltek/apps?permalink=empresas 
Request Method:GET 
Status Code:404 Not Found 
Remote Address:127.0.0.1:3000 
Referrer Policy:no-referrer-when-downgrade 

HTTP/1.1 404 Not Found 
X-Powered-By: Express 
date: Fri, 05 May 2017 18:13:42 GMT 
server: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.28 
vary: accept-language,accept-charset 
accept-ranges: bytes 
connection: close 
transfer-encoding: chunked 
content-type: text/html 
content-language: es 
+0

Uに devServer: { publicPath: '/build/', port: 3000, proxy: { '/api': { target: 'http://gestios.loc/api' secure: false, changeOrigin: true } }, historyApiFallback: true } 願いにこのヘルプを追加しようとするが、それは、このトピックに従って解決:http://stackoverflow.com/questions/36662065/webpack-dev-server-proxy-dosent-work – 50l3r

答えて

関連する問題