swagger documenting not loading after deploying th

2019-08-10 09:14发布

I wrote REST API gateway using flask-restplus plugin, I tested it locally it work using flask run but when I try to run the website on server

it works opens in the browser but swagger documentation doesnt shows up in browser console I can see the below error: enter image description here

Here is my site nginx configuration: sites-available $ vi clinic_backend

server {
        listen 80 default_server;
        listen [::]:80;

        root /var/www/html;

        server_name example.com;

        location /static {
            alias /var/www/html/static/;
        }

        location / {
            try_files $uri @wsgi;
        }

        location @wsgi {
            proxy_pass http://unix:/tmp/gunicorn.sock;
            include proxy_params;
        }

        location ~* .(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
            access_log off;
            log_not_found off;
            expires max;
        }
}

0条回答
登录 后发表回答