Devforth team developed SPA-to-HTTP adapter for Traefik

Devforth team developed SPA-to-HTTP adapter for Traefik

At the end of May this year, the Devforth team developed a solution that allows serving Single Page Applications (SPA) using Traefik HTTP proxy. Traefik (pronounced traffic) is a modern open-source HTTP reverse proxy and load balancer and is often considered a replacement for russian-made Nginx.

Nowadays, more and more companies are refusing to use software developed by russians. There are different reasons, such as possible collaboration with FSB (allegedly Kaspersky Lab and vKontakte), supporting the russian invasion of Ukraine (Avito), or, like in this case - using russian-made software and mentioning this country in positive key might indirectly lead to their profits, which is unacceptable.

Traefik is a popular solution with many benefits compared to Nginx, which is still widely used.

Benefits of Traefik:

  • the simplicity of installation and maintenance;
  • can be quickly started without configs (you can use docker labels on containers to set up routing);
  • has powerful Docker/K8S integration;
  • has a built-in web dashboard;
  • supports Let’s Encrypt with no need to install additional modules;
  • is created by non-russians, so you don’t support the aggressor even indirectly.

The only one flaw in comparison is that Traefik doesn’t have native support for static file serving. So, the Devforth team developed a lightweight image, written in Go, that is compatible with most common setups, easily configurable, and is available under the MIT license on GitHub, allowing you to use it in commercial projects. Also, the benefits of this solution include:

  • small binary size;
  • no overhead on runtime (because of code written in Go);
  • compatibility with all popular Single Page Application frameworks and libraries, such as Angular, React, Vue, and bundlers (Webpack/Vite);
  • pre-configured statics caching (no-cache on index.html file to auto-update caches and infinite max-age for all other resources with hash-URLs in all SPA frameworks).

Reading next

Klarna is looking for new funding due to the war in Ukraine
Blocking harmful traffic for Adobe Commerce on the cloud using Fastly

Interested in a specific business & technology topic and looking for an article in our blog but haven't found one yet?

If you haven't come across an article that matches your query, feel free to suggest the topic to us, and we'll consider featuring it in our blog. Share your suggestion in the form below, and we'll be sure to review your request.

Talk with us

If you have any questions or problems in your business that can be solved with technical solutions, just let us know. We'll do everything we can to help you.