David Crawford · Jul 15, 2019

Non CSP Files

CSP pages extend %CSP.Page. What about html/css/js/etc that are hosted on the same web application? Is there any way to override how they're processed like with how you can override a CSP page and CSP REST logic?

Thank you!


1 227
Discussion (4)2
Log in or sign up to continue

Hi David,

It's a little unclear if you are trying to conditionally serve static files, conditionally generate static files or something else. Do you have a more specific use case to help answer the question?

It's serving static files. I like that it's easy to manipulate how the server sends CSP, such as manipulating custom headers or session information right out the gate. But I also have a lot of non-csp resources that are served that I'd like to know more about how the server handles them. Do they go through the CSP logic? How are they served from server to client?

They go through your web server (i.e. Apache, NodeJS, IIS) directly.

You can serve files via REST, from files or XDatas. Here's an example in WebTerminal app, but it can be generalized to server arbitrary files from FS.