I’m working with SIM800L IoT devices that can only send HTTP POST requests (not HTTPS). My backend API is on Vercel, which only accepts HTTPS, so I wrote a small Node.js proxy:
const express = require('express');const axios = require('axios');const app = express();app.use(express.json());app.post("/proxy", async (req, res) => { try {console.log("Incoming data:", req.body);const response = await axios.post("https://live-trail-server.vercel.app/api/data", { trailId: req.body.trailId, moisture: req.body.moisture, }, { headers: {"Content-Type": "application/json","x-api-key": req.body.apiKey, }, });res.json(response.data);} catch (err) { console.error("Proxy fetch error:", err.message); res.status(500).json({ error: "Proxy error", details: err.message });} });app.listen(3000, () => { console.log("Proxy server running on http://localhost:3000");});This proxy works locally, but I need to host it online. I tried deploying to Render, but I’m not sure if Render forces HTTPS (which would break SIM800L).
Does Render allow incoming HTTP POSTs on the http://.onrender.com URL, or will it automatically redirect to HTTPS? If so, how can I keep it listening on plain HTTP?