Skip to content

Commit

Permalink
Add ContentSecurityPolicyFilter.registerAllowedSources() (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber authored Feb 20, 2025
1 parent cb8a8ac commit a271a04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jbrowse/src/org/labkey/jbrowse/JBrowseModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.labkey.api.module.ModuleContext;
import org.labkey.api.pipeline.PipelineService;
import org.labkey.api.query.DetailsURL;
import org.labkey.api.security.Directive;
import org.labkey.api.security.permissions.AdminOperationsPermission;
import org.labkey.api.sequenceanalysis.SequenceAnalysisService;
import org.labkey.api.sequenceanalysis.pipeline.SequencePipelineService;
Expand Down Expand Up @@ -114,7 +115,8 @@ public void doStartupAfterSpringConfig(ModuleContext moduleContext)
JBrowseService.get().registerGroupsProvider(new JBrowseLuceneSearch.TestJBrowseGroupProvider());

// These are all part of the JBrowse demo data:
ContentSecurityPolicyFilter.registerAllowedConnectionSource(this.getClass().getName(), "https://jbrowse.org", "https://s3.amazonaws.com", "https://ftp.ncbi.nlm.nih.gov", "https://www.gstatic.com");
ContentSecurityPolicyFilter.registerAllowedSources(Directive.Connection, this.getClass().getName(), "https://jbrowse.org", "https://s3.amazonaws.com", "https://ftp.ncbi.nlm.nih.gov");
ContentSecurityPolicyFilter.registerAllowedSources(Directive.Style, this.getClass().getName(), "https://www.gstatic.com");

ContextListener.addShutdownListener(new JBrowseLuceneSearch.ShutdownHandler());
}
Expand Down

0 comments on commit a271a04

Please sign in to comment.