Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Setting up a proxy server

Topic Labels: Scripting extentions
1128 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi everyone,

This question might sound a bit naive and I apologize in advance. What is the best way to set up a proxy to a backend app in the scripting blocks dev environment?

When using create-react-app I make the proxy in the package.json

"proxy": {
    "/api/projects": {
      "target": "http://localhost:3000"
    }

or more recently using http-proxy-middleware and creating a setupProxy.js on my src folder.

const { createProxyMiddleware } = require(‘http-proxy-middleware’);

module.exports = function (app) {
  app.use(
    '/api',
    createProxyMiddleware({
      target: 'http://localhost:3000',
      changeOrigin: true,
    })
  );
};

I am not quite sure to set that when using the blocks. Thanks so much for your help!

2 Replies 2
I'm sorry, but unfortunately, I'm not an expert in coding proxies and using them. I only purchased them already done and verified, and it has been working great for me ever since I started. I was a manager of a great corporation. When Covid started, we had to work from home. It was required to use a VPN, but it would not connect to my Wi-Fi. My friend said I should buy a proxy server. And I did. But it got installed when I paid for it, and I only had to connect it to the network. I can't help you any more than this. However, I hope someone here will. Good luck.

Generally, you will use a proxy if your school or workplace provides it. You can also use a proxy to hide your IP address or access geo-blocked sites not available in your country.