Can the Django dev server correctly serve SVG?

后端 未结 3 856
夕颜
夕颜 2020-12-01 05:32

I am trying to serve a svg map using:


    

        
      
      
      
3条回答
  •  一向
    一向 (楼主)
    2020-12-01 06:00

    In my case the issuer was the deployment with nginx+gunicorn. My nginx docker image served the text/plain mimetype for .svg file. This extension of mime.types resolved the issue:

    http {
        include mime.types;
        types {
            image/svg+xml svg;
        }
    

提交回复
热议问题