-
Notifications
You must be signed in to change notification settings - Fork 22
Home
Andrew Fawcett edited this page Sep 6, 2017
·
1 revision
Welcome to the deploy-to-sfdx wiki!
To develop the HTTP referer support you need to run locally under HTTPS as browsers do not exchange this header value between HTTPS (GitHub) and HTTP.
- Create a certification in the root
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days XXX
Refer to this page and the section Creating your SSL Certificate.
- Add the following to app.js
const app = express();
const router = express.Router();
- Add the following to the bottom of app.js
var sslOptions = {
key: fs.readFileSync('key.pem'),
cert: fs.readFileSync('cert.pem'),
passphrase: 'yourcertpass'
};
https.createServer(sslOptions, app).listen(443);
- Run local
To run local with port 443, you have to use sudo (or if your concerned on security use another port)
sudo heroku local
- You will need to use a Connected App with https://localhost/oauth/callback as the callback, ensure to update the .env file with the new oAuth secrets.