Proxies requests from Loggly's JavaScript client in an ASP.NET MVC application to help protect the token.
Make sure attribute routes are enabled by adding the following, most likely in Application_Start()
:
RouteTable.Routes.MapMvcAttributeRoutes();
Also, by default, the Loggly token is expected to be in the Web.config
:
<configuration>
...
<appSettings>
...
<add key="LogglyToken" value="YourLogglyTokenHere"/>
</appSettings>
<configuration>
Follow Loggly's documentation regarding using a proxy:
_LTracker.push({
'logglyKey': 'your-customer-token',
'sendConsoleErrors' : true,
'tag' : 'javascript-logs',
'useDomainProxy' : true
});
Remember, don't set the Loggly token in JavaScript!