A
A
Alexey Nevzorov2019-03-20 14:15:52
Nginx
Alexey Nevzorov, 2019-03-20 14:15:52

How to make a proxy between mobile and desktop frontends?

Nginx receives a request from the outside world, then gives it to a go script, which, given the User-Agent and cookies, redirects either to touch.js or descktop.js.
touch.js and descktop.js - serve as frontend for server rendering.
1. In this scheme, nothing bothers me, go works out extremely quickly, but is there a more established approach?
2. touch.js and descktop.js, as well as other services, are in separate doker containers (one git repository = one container), isn't it too exaggerated for a go-proxy to allocate a separate container if there is only one small file in src?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Syomov, 2019-03-20
@proghermit

Nginx does this out of the box. If your go proxy does not pull up data about new UAs of mobile devices from somewhere, but simply works according to the given rules, then this can be done in nginx, and you can do without this link altogether.
It’s quite normal to allocate a separate container for at least one binary, nothing like that, moreover, it was originally intended that way. =)

S
sim3x, 2019-03-20
@sim3x

https://www.google.com.ua/search?q=nginx+user-agen...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question