re: Vue+Flask on DigitalOcean: how to proceed? VIEW POST

FULL DISCUSSION
 

I deployed a side project using Flask/React last week on digital ocean. I just installed nginx and configured a block to serve a static build of the react app and one to serve the flask API via gunicorn. I also setup gitlab CI to build/deploy, which seems to be working pretty good so far.

If your API is being used by the Vue app, it'll need to be public because of the nature of SPAs. You could probably enforce domain referral requirements, but usually you just secure the API with the knowledge that it's publicly available.

 

If your API is being used by the Vue app, it'll need to be public because of the nature of SPAs.

But that only in this solution or also in @rhymes solution described above?

 

@danroc mine is behind basic authentication. The SPA talks to the API and they both are behind basic authentication (TLS only)

 

It'll be public in his solution, as well. The only difference is that the initial index.html file will be served via the flask app, instead of just through nginx.

code of conduct - report abuse