mirror of https://github.com/grafana/grafana
Build: Fix failing CSS asset paths (#95380)
* build(webpack): set publicpath and process urls to resolve assets correctly * build(webpack): add back --progress to build * Add local cdn (cherry picked from commit 7a19523fa476fd5ff2d7669d116f5be462b100f5) * chore(devenv): fix local_cdn path in ngnix conf * chore(codeowners): add frontend-ops as owners of local_cdn docker block --------- Co-authored-by: Andreas Christou <andreas.christou@grafana.com>pull/95405/head
parent
d0e124e2f9
commit
e894b19c1a
@ -0,0 +1,24 @@ |
||||
server { |
||||
root /data; |
||||
autoindex on; |
||||
|
||||
location / { |
||||
if ($request_method = 'OPTIONS') { |
||||
add_header 'Access-Control-Allow-Origin' '$http_origin' always; |
||||
add_header 'Access-Control-Allow-Credentials' 'true' always; |
||||
add_header 'Access-Control-Allow-Headers' '*' always; |
||||
add_header 'Access-Control-Allow-Methods' '*'; |
||||
# add_header 'Access-Control-Max-Age' 1728000; |
||||
add_header 'Content-Type' 'text/plain; charset=utf-8'; |
||||
add_header 'Content-Length' 0; |
||||
return 204; |
||||
} |
||||
|
||||
add_header 'Access-Control-Allow-Origin' '$http_origin' always; |
||||
add_header 'Access-Control-Allow-Methods' '*' always; |
||||
add_header 'Access-Control-Allow-Headers' '*' always; |
||||
add_header 'Access-Control-Allow-Credentials' 'true' always; |
||||
|
||||
rewrite ^/grafana-oss/11.4.0-pre/public(.*)$ $1 last; |
||||
} |
||||
} |
@ -0,0 +1,11 @@ |
||||
version: '2' |
||||
|
||||
services: |
||||
grafana_local_cdn: |
||||
image: nginx:alpine |
||||
container_name: grafana_local_cdn |
||||
ports: |
||||
- "8080:80" |
||||
volumes: |
||||
- ../../public:/data |
||||
- ./default.conf:/etc/nginx/conf.d/default.conf |
Loading…
Reference in new issue