Curious to know how you do a port redirect of a xojo web app
as a xojo web app can only listen to one port (in fact 3: the normal, the secure and the debug)
how do you guys deal with when you have to redirect one port ?
I have actually an app that listen to a certain port, I want to change it but be transparent to the users
I use Nginx. Running several web apps, each one has a different port assigned. Then I use subdomains so that Nginx can direct to the correct web app port.
Nginx, HAProxy and a few other apps are specifically designed for this purpose. And they offer load balancing features as a bonus. Your small project will likely become a large project pretty quickly. There is also a security aspect that specialized apps can provide, that would be hard to redevelop from scratch. I use HAProxy for the exact purpose that you are discussing. HAProxy (or Nginx) is integrated with my firewall distro (OPNSense). Mine may not be a use case that everyone can duplicate, but Nginx (or HAProxycan be deployed on most Linux or Unix servers. Lifeboat will make it even easier and deploy Nginx for you on your target Linux server if I am not mistaken, ready for load balancing, too.
I would certainly look at using a best of breed instead of re-inventing reverse proxy functionality. Of course, if it is the challenge that you are after, or if you are against using third party products (although here, we are not talking about plugins), it is a whole different story!
depending on the users, public www users, users of a company (your teammates), intranet or internet.
https using 443 if you not input the port via colon. (web server default)
having a url https://domain:portofapp1/ is generally not wrong, but making it accessible from outside is probably trouble for multiple apps because each provide a own port.
the pro of a reverse-proxy is that you setup https once, the xojo web apps behind can be all http
said in first post, but I have used a specific port for my xojo app for years now
and I want to move to 443 for better connexion in private networks
many users I don’t want to change the links to everyone prefer to make a silent redirection
if possible ?
If you want to do this completely in Xojo, you could add a server socket whose only job is to tell browsers to redirect. It would listen on the old port , take in http requests and then send a response with three lines separated by EndOfLine.Windows (because line endings need to be CRLF)
So 301 is a permanent redirect whereas 308 has the addition of telling the client to use the exact same method. It should have the same effect, but should also fix any HandleUrl calls that don’t use GET.