apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

"Refused to load the image" , which build by deploy-with-docker.md

Open vitcou opened this issue 2 years ago • 2 comments

Issue description

i used the "deploy-with-docker.md" to build the docker image with git id 0273865d54eb60a5812c403a887398fe74d30a65()

the image can run, but i found the plugin image can not load right.

image

Expected behavior

plugin image can load right.

How to Reproduce

1.using "deploy-with-docker.md" build image by master(0273865d54eb60a5812c403a887398fe74d30a65) 2.run the docker container 3.add route 4.the plugin page can not load default plugin images right

Screenshots

No response

Environment

  • apisix version (cmd: apisix version):
  • OS (cmd: uname -a):
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run etcd --version):
  • apisix-dashboard version, if have:
  • Browser version, if have:

Additional context

No response

vitcou avatar Aug 12 '22 15:08 vitcou

@FangSen9000 Would you be interested in this issue?

SkyeYoung avatar Aug 17 '22 06:08 SkyeYoung

@FangSen9000你对这个问题感兴趣吗?

Pnpm is waiting for BZP's comments and is now working for the editor. If this bug still exists after the editor is finished (the editor will take about five days), I will consider it.

FangSen9000 avatar Aug 17 '22 07:08 FangSen9000

i found the reason, is the conf.yaml key "content_security_policy" set

relate to https://github.com/apache/apisix-dashboard/issues/2546 https://github.com/apache/apisix-dashboard/pull/2548

  security:
  #   access_control_allow_origin: "http://httpbin.org"
  #   access_control_allow_credentials: true          # support using custom cors configration
  #   access_control_allow_headers: "Authorization"
  #   access_control-allow_methods: "*"
  #   x_frame_options: "deny"
    content_security_policy: "default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src * 'self' data: https:; frame-src xx.xx.xx.xx:3000"  # You can set frame-src to provide content for your grafana panel.

using

img-src * 'self' data: https:; 

work ok!

vitcou avatar Aug 28 '22 05:08 vitcou