Secure your Model-Glue XML files from prying eyes

I sent an email to Ray Camden a few months ago to let him know that his application XML for one of his sites was exposed, showing off his logic basically. He mentioned that you can change those XML files to be .cfm and do some tweaking to hide them from other people, but it sounded like a pain. Read on how to fix!With the new version of Model Glue, you can include other XML files. So, now my entire /config/ModelGlue.xml file available on my web root looks like this:

<br /><?xml version=<span class='cc_value'>"1.0"</span> encoding=<span class='cc_value'>"UTF-8"</span>?><br /><modelglue><br /> &#60;include template=<span class='cc_value'>"/ModelGlue/actionpacks/email/config/ModelGlue.xml"</span> /><br /> &#60;include template=<span class='cc_value'>"/auction/config/eventHandlers.xml"</span> /><br /> &#60;include template=<span class='cc_value'>"/auction/config/controllers.xml"</span> /><br />   <br /> <controllers></controllers>   <br /> <event-handlers></event-handlers><br /></modelglue><br /><br />

The /auction path is a Coldfusion mapping, so its un-available to the public, but everything still loads and runs great. I also find its a lot easier to have a few seperate MG configs, scrolling up to my controllers from the bottom of my eventHandlers over and over was a pain, seperating them made my job easier.
Digg StumbleUpon Facebook Technorati Fav newsvine reddit FARK Google Bookmarks