# How to configure csp.rules for kibana on docker

**URL:** <https://discuss.elastic.co/t/how-to-configure-csp-rules-for-kibana-on-docker/243025>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [July 29, 2020, 9:19am UTC](https://discuss.elastic.co/t/how-to-configure-csp-rules-for-kibana-on-docker/243025 "2020-07-29T09:19:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raja\_SP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raja_sp/32/71237_2.png) [@Raja\_SP](https://discuss.elastic.co/u/Raja_SP)\
**Post date:** [July 29, 2020, 9:19am UTC](https://discuss.elastic.co/t/how-to-configure-csp-rules-for-kibana-on-docker/243025/1 "2020-07-29T09:19:11Z")

</div>

I want to add the following rule to the kibana.yml for kibana on docker, version 7.7.1. I will externalise the kibana.yml filke using the volume mapping. But what is the right syntax ? The below syntax works for the native kibana version but not for the docker version.

csp.rules:  
- "script-src 'unsafe-inline' 'unsafe-eval' 'self' [https://maps.googleapis.com](https://maps.googleapis.com)"

Thanks !

---

<div class="post-metadata">

**Author:** ![tiagocosta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagocosta/32/40045_2.png) [@tiagocosta](https://discuss.elastic.co/u/tiagocosta)\
**Post date:** [July 29, 2020, 11:58am UTC](https://discuss.elastic.co/t/how-to-configure-csp-rules-for-kibana-on-docker/243025/2 "2020-07-29T11:58:03Z")

</div>

@Raja_SP could you please try

```auto
csp.rules: "script-src 'unsafe-inline' 'unsafe-eval' 'self' https://maps.googleapis.com"

```

Cheers

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [July 29, 2020, 2:52pm UTC](https://discuss.elastic.co/t/how-to-configure-csp-rules-for-kibana-on-docker/243025/3 "2020-07-29T14:52:21Z")

</div>

The syntax should be the same within the `kibana.yml` as there is no difference between how it is handled in Docker. Are you receiving an error with the config you provided? If so, can you provide it?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 26, 2020, 2:52pm UTC](https://discuss.elastic.co/t/how-to-configure-csp-rules-for-kibana-on-docker/243025/4 "2020-08-26T14:52:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
