function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
aayush kumar 11aayush kumar 11 

lightning container can't access custom application in static resource - 403 Forbidden

I have a custom app that I uploaded as a static resource. I have tested that it works if I navigate directly to it. 
The problem is when I use that URL in a lightning container in a component. When I checked network traffic, I found that
  1. instead of https://my-dev-ed.lightning.force.com/resource/myapp/default.html there is a request to https://my-dev-ed--c.container.lightning.com/lcc/myapp/default.html
  2. The response to this request is 403 Forbidden
I truly appreciate your help.
aayush kumar 11aayush kumar 11
my component has this tag
<lightning:container aura:id="myapp" src="/resource/myapp/default.html)}" />

 
kumar_arunkumar_arun
Hi aayush,
You should try like this.
<lightning:container aura:id="ReactApp" aura:id="myapp"  src="{!$Resource.ResourceName+ '/myapp/default.html" />
Replace Resource Name: with your Static Resource Name.
Your static resource file hierarchy should look like :
 -> myapp
            -> default.html

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/container_example_realty.htm (http://<lightning:container aura:id="ReactApp" aura:id="myapp"  src="{!$Resource.ResourceName+ '/myapp/default.html" />)