Forge tunneling does't include the css file

When deployed my application is working perfectly fine , but when tunneling , the css file is not being included so the elements are being rendered without styling , I tried both chrome and firefox browser
I even used a relative path in my react application to import the css file.
modules:
jira:globalPage:
- key: user-mananger-hello-world-page
resource: main
resolver:
function: resolver
title: user_Mananger
function:
- key: resolver
handler: index.handler
resources:

  • key: main
    path: static/hello-world/build
    tunnel:
    port: 3000
    permissions:
    scopes:
    • manage:jira-configuration
    • read:jira-work
    • read:issue-details:jira
    • read:jira-user
    • read:group:jira
    • write:group:jira
    • storage:app

app:
id: ari:cloud:ecosystem::app/5e7e9b6b-a294-40d6-ade5-3fd7633df677

Above is my yml file

Hi @random1knd,

Do you see the following warning in the forge tunnel when loading the page?

CSP violation detected for 'style-src-elem' while serving content at http://localhost:8001/
For an app to share data with external resources or use custom CSP, follow the steps in: https://go.atlassian.com/forge-content-security-and-egress-controls

I did in my test and can now successfully see the styling being applied and reloaded when any setting is changed after adding the following to the manifest.yml file:

permissions:
  content:
    styles:
      - 'unsafe-inline'

By the way, this is the topic that pointed me in the right direction. While I think the specific problem mentioned there is specific to the AtlasKit components, I wanted to share it anyway in case you’ll use any of the AtlasKit components as that might help.

Cheers,
Caterina

1 Like

Thanks a lot , I’ve been struggling with this since the past few days , It’s working now

1 Like