spa-to-http icon indicating copy to clipboard operation
spa-to-http copied to clipboard

Proxy Path

Open AndreGuerra123 opened this issue 1 year ago • 2 comments

Hi,

Currently, I need to add a proxy pass (designation under nginx) to /api, common in most vuejs projects. My case is to a external URL. Is this possible and how to do it?

AndreGuerra123 avatar Feb 01 '24 21:02 AndreGuerra123

AFAIK this replaces nginx to serve static assets, not as a reverse proxy. If you want to use another reverse proxy than nginx, try out https://traefik.io/traefik/

In general you would have a setup similar to traefik ->backend (some image) ->frontend (served by this image)

and have traefik control what paths point to where

maybeanerd avatar Feb 17 '24 13:02 maybeanerd

Yes, exactly, spa-to-http is generally designed for use with Traefik or when you have no proxy at all. Traefik is simpler and easier to manage in most use-cases then Nginx. It has a lot of nice features like very simple and free HTTPS(SSL) setup (Example).

So in general a lot of developers used Traefik for proxying API/complex schemes, but served SPA bundles with things like Nginx (in combination with Traefik). So we creates SPA-to-HTTP as dedicated and faster alternative to Nginx, which again could be used in combination with Traefik. You can read detailed Traefik vs Nginx comparison guide, there we explained why we switched most of our projects at Devforth to Traefik.

Also I would recommend blog post about spa-to-http initial usecases

ivictbor avatar Feb 21 '24 08:02 ivictbor