Originally SPX was designed for local, on-site installation and usage, but more and more production is done via the cloud where a secure data transfer and the use of https protocol is a must.
https for local SPX instances
Locally running SPX Server instance is typically at http://localhost:5656 and it cannot be accessed with https protocol directly.
For this there are third party services that can create a public, secure SSL tunnel to a locally running http application
ngrok (https://ngrok.com/)
pinggy (https://pinggy.io/)
In this article we will be using Pinggy. You can set it up for testing on their website very fast without installing or using a credit card. For production you should set up an account and pay a small monthly fee, for permanent addresses and for removing their 60 minute time limit.
Use pinggy.io for https
Go to pinggy.io
Click try it for free
Use the settings
Node.js
npx http-server
local port 5656
These will create a command:
ssh -p 443 -R0:localhost:5656 -L4300:localhost:4300 [email protected]
Copy the above command
On your computer open Command Prompt (win) or Terminal (mac)
Paste the command and <enter>
Answer "yes" to accept the creation of the tunnel
Once completed pinggy will give you public URLs for http and https protocols.
Use the pinggy URL instead of the normal <host>:<port> given by SPX to access the user interface and for SPX API endpoints
Please keep the terminal / console window for the duration of the session. If closed the tunnel will be terminated.
Remember, by default, the connection has a 60-minute time limit. Register on the website for the uninterrupted tunnel for production.
https for cloud-based instances
Cloud environments and virtual machines have various tools and systems for maintaining SSL-sertificates and for secure connections. Consult the documentation of your platform or contact us for managed SPX Cloud instances.