Skip to content

Instantly share code, notes, and snippets.

@seeya
Created December 28, 2019 04:55
Show Gist options
  • Save seeya/c307f62b712fb4e1468673aefbba1f97 to your computer and use it in GitHub Desktop.
Save seeya/c307f62b712fb4e1468673aefbba1f97 to your computer and use it in GitHub Desktop.
const express = require('express');
const app = express();
const ROUTE = "https://restaurant-1257666530.file.myqcloud.com";
app.get('/*', (req, res, next) => {
let proxy = `${ROUTE}${req.path}`;
console.log(proxy);
if(req.path.indexOf("project.manifest") !== -1) {
return res.sendFile("./project.manifest");
}
res.send(proxy);
});
app.listen(80);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment