Question
· May 24, 2017

How to include a macro file in a CSP page

I'd like to include a .inc file in a tag-based CSP page. The include file defines a bunch of macros that I want to use in CSP runtime expressions. Is there any way to do this?

Discussion (3)1
Log in or sign up to continue

My question is where to put the #include statement so that runtime expressions can reference the included macros. I tried both putting it in a script tag, and directly at the top of the csp file. Both ways it fails to compile with a "Referenced macro not defined" error.

EDIT - Sorry, I just noticed that was a link. The include directive should do what I need. Thanks!