How to set up Vue deployment properly in apps

Hi guys, I recently set up and Django API using Digital Ocean Apps & I wanted to connect it to a Vue frontend.

When I was running Vue as a static site, it would only call localhost rather than targeting the API_URL which I set in my environment variables. I switched it to a web service, but now I’m getting

Invalid Host Header

whenever I navigate to the web page.

The Django app is deployed using gunicorn, but how should I be deploying the Vue component to allow myself to have a production version of vue running directly from my frontend component?

Currently I’m targeting the frontend with ${APP_URL} and the backend with ${APP_URL}/api.

I tried following the apps tutorial but I’m still a bit lost.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @jakesteele54,

The Invalid Host Header issue occurs when your application is set to listen on localhost instead of That error typically indicates that the server isn’t accepting external connections. Please be sure that is set to run on

You also may need to disable host checks as well:

// vue.config.js
module.exports = {
    // options...
    devServer: {
        disableHostCheck: true

I hope this helps!

Cheers, Taha Fatima