I'd be surprised if that ever worked for two reasons:
SSI is never supposed to go "off box". You can include files using the server-side path, or URLs from the current server only.
Even for URLs, the original environment is unlikely to be passed to the SSI, because the SSI is simply providing additional text to be included dynamically.
I suggest you restructure your design. Incorporate the functionality of what would have been included directly into your CGI application instead.