We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy is not working while passing Protocol, Host and Port in setupProxy.js file.
` const { createProxyMiddleware } = require('http-proxy-middleware');
// const env = dotenv.config({ path: '../config.env' }) // const protocol = 'http://' const protocol = JSON.parse(process.env.HTTPS) ? "https:" : "http:"; const host = process.env.PROXY_HOST const port = process.env.PROXY_PORT
module.exports = function (app) {
module.exports = function (app) { try{ app.use( '/graphql', createProxyMiddleware({ target: { protocol: protocol, host: host, port: port }, changeOrigin: true, }) ); } catch(err){ console.log(err.message); } }; `
The text was updated successfully, but these errors were encountered:
rajneeshweb
No branches or pull requests
Proxy is not working while passing Protocol, Host and Port in setupProxy.js file.
`
const { createProxyMiddleware } = require('http-proxy-middleware');
// const env = dotenv.config({ path: '../config.env' })
// const protocol = 'http://'
const protocol = JSON.parse(process.env.HTTPS) ? "https:" : "http:";
const host = process.env.PROXY_HOST
const port = process.env.PROXY_PORT
module.exports = function (app) {
module.exports = function (app) {
try{
app.use(
'/graphql',
createProxyMiddleware({
target: {
protocol: protocol,
host: host,
port: port
},
changeOrigin: true,
})
);
}
catch(err){
console.log(err.message);
}
};
`
The text was updated successfully, but these errors were encountered: