Content security policy code issue

0
We try to apply content security policy, with help of Mendix documentation https://docs.mendix.com/howto9/security/using-mobile-capabilities/csp/.   Mendix version 9.24.3   When copying the code of the first block (for file appSetup.js), visual studio code marks the "#" at line 8 as wrong. There's also no comma at the end of that line, but maybe that is intended.   window.dojoConfig = {     // Default Dojo config     isDebug: false,     useCustomLogger: true,     async: true,     baseUrl: "mxclientsystem/dojo/",     cacheBust: "{{cachebust}}",     #{OTHER_DIR}Redirect: "#{RTL_REDIRECT}"     // CSP Dojo config     has: {         "csp-restrictions": true     },     blankGif: "mxclientsystem/dojo/resources/blank.gif" }; if (!document.cookie || !document.cookie.match(/(^|;) *originURI=/gi))     document.cookie = "originURI=/login.html" + (window.location.protocol === "https:" ? ";SameSite=None;Secure" : "");   The API of DOJO toolkit gives us a 404, so we can't find help there.   What are we missing? Thank you for considering our issue!
asked
1 answers
0

You can change the problematic line of code to be similar to what you would have had in the index.html script tag for dojo and also add the comma in. You should find this will then compile. Review your developer tools console  within your browser as well as the sources tab for errors and issues. 

 

rtlRedirect: "index-rtl.html",

 

Be aware the various setup values within the document below will affect you depending on what your app uses – eg using fonts and images from external sources. Work through what is best depending on your app.

 

Environment Details | Mendix Documentation

answered