# \[OT\] Workaround unsafe-inline css

**URL:** <https://discourse.gohugo.io/t/ot-workaround-unsafe-inline-css/25682>\
**Category:** Using Themes\
**Created:** [May 20, 2020, 2:41pm UTC](https://discourse.gohugo.io/t/ot-workaround-unsafe-inline-css/25682 "2020-05-20T14:41:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![F43nd1r](https://avatars.discourse-cdn.com/v4/letter/f/e19adc/32.png) [@F43nd1r](https://discourse.gohugo.io/u/F43nd1r)\
**Post date:** [May 20, 2020, 2:41pm UTC](https://discourse.gohugo.io/t/ot-workaround-unsafe-inline-css/25682/1 "2020-05-20T14:41:57Z")

</div>

I’m using the ananke theme, which uses inline styles for multiple things, e.g. header images.  
My host CSP does not allow `unsafe-inline` css. How do I work around this issue?

Is it possible to somehow include hashes for inline css?  
Alternatively, can I generate and include stylesheets from a partial? If so, how would I identify the element in css?

Relevant lines from theme partial page-header

```
  {{ $featured_image := (trim $featured_image "/") | absURL }}
  <header class="cover bg-top" style="background-image: url('{{ $featured_image }}');">
```

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 21, 2020, 5:07pm UTC](https://discourse.gohugo.io/t/ot-workaround-unsafe-inline-css/25682/2 "2020-05-21T17:07:55Z")

</div>

> [@F43nd1r](#):
>
> How do I work around this issue?

You need to talk to your host.

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [May 21, 2020, 6:39pm UTC](https://discourse.gohugo.io/t/ot-workaround-unsafe-inline-css/25682/3 "2020-05-21T18:39:59Z")

</div>


