Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy domain support #27

Merged
merged 3 commits into from Aug 3, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Added 'useDomainProxy' usage

  • Loading branch information
varshneyjayant committed Jul 31, 2015
commit 1bc58098dec3c483d9722217246fad520690962d
@@ -60,3 +60,31 @@ _LTracker.push({
'tag' : 'tag1,tag2'
});
```

Setup Proxy for Ad blockers
----------
You can proxy the requests from your own domain if the script or its requests are blocked by Ad blockers. To do this, you need to perform following steps

Set `useProxyDomain` property to true

```Javascript
_LTracker.push({
'logglyKey': '8c518f97-e3e0-4bfb-a8ed-582d084a5289',
'sendConsoleErrors' : true,
'tag' : 'javascript-logs',
'useDomainProxy' : true

This comment has been minimized.

@mostlyjason

mostlyjason Jul 31, 2015
Contributor

Why not just use the domain proxy if it's not null? Wouldn't it be simpler to have one variable instead of two?

+_LTracker.push({

  • 'logglyKey': '8c518f97-e3e0-4bfb-a8ed-582d084a5289',
  • 'sendConsoleErrors' : true,
  • 'tag' : 'javascript-logs',
  • 'domainProxy' : 'loggly.mydomain.com'
    +});

This comment has been minimized.

@varshneyjayant

varshneyjayant Aug 3, 2015
Author Contributor

Are we supporting them to use any domain? We are currently appending /loggly to their current domain. Like

inputUrl = window.location.host + '/loggly' + '/input/token...;

Also, we have give the example for the same in server configuration.

This comment has been minimized.

@mostlyjason

mostlyjason Aug 3, 2015
Contributor

Ahh thanks for explaining! That seems fine too. If someone wants to add other domains they can do it in another PR.

});
```

Use the following configuration on your server to forward the requests to Loggly

```
#Proxy to Loggly
location /loggly/ {
rewrite ^/loggly/(.*)$ /$1 break; # remove the '/loggly' part from the path, leaving /inputs/xxxxxxxx-xxxx-.../tag/xxx
proxy_set_header Host logs-01.loggly.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://logs-01.loggly.com;
}
```
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.