Hello everyone, I have enabled content security policy in LifeTime environment. So, i can't load the script form external link if i use to load script with "expression" in web screen. eg. 

and in the browser dev tool, show an error message "refuse to load the script because it violate the CSP and so on". Is there any ways to load script without disabling CSP?


with regards

Hi Phone,

create a script file from external link source and use it in  application instead of this way  (external link).


Regasds

Rahul Sahu



Rahul Sahu wrote:

Hi Phone,

create a script file from external link source and use it in  application instead of this way  (external link).


Regasds

Rahul Sahu



Can u give me some guideline on how to do it?

Thank you.


Solution

hi Phone,

Go to external link "https://cdn.omise.co/omise.js" copy to code and paste in notepade and save with js extention.

If you are using Traditional app - deploye this js file into Resources and set

SyntaxEditor Code Snippet

deploye action  - Deploy to Target Directory

and use this file in your script.

If you are using Reactive App -  Create a new Script in Interafce section and use this script in page "Reruired script " property.


Hope this will help you.

Regards

Rahul Sahu

Solution