• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Content Security Policy style-src setting

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Content Security Policy style-src setting

This topic is: resolved

Tagged: csp, style-src

  • This topic has 2 replies, 2 voices, and was last updated 6 years, 11 months ago by Robert Falkowitz.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 28, 2018 at 9:14 am #224660
    Robert Falkowitz
    Participant

    I am using the Infinity Pro theme and have several background images on the front page. I wish to implement a Content Security Policy on my site, but note that setting the value of style-src to 'self' causes those backgrounds to not be displayed. The images themselves are stored on the same server as everything else, so that is not the issue. I note that two sources of css, other than my own host, are fonts.googleapis.com and code.ionicframework.com. However, adding them to the value of style-src does not solve the problem.

    So, my question is whether someone can tell me how to set the value of style-src in this case.

    November 28, 2018 at 1:18 pm #224667
    Victor Font
    Moderator

    style-src 'self' requires that files be served from the same URL scheme and port number. This directive blocks inline styles. The background images in Infinity Pro are loaded as inline styles generated at run time. This is why you can't see them.

    To allow the inline styles, you have to include 'unsafe-inline'


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    November 28, 2018 at 1:33 pm #224670
    Robert Falkowitz
    Participant

    Thanks, Victor. Adding 'unsafe-inline' to 'self' does the trick.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Content Security Policy style-src setting’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble