Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
51bca7d8
Commit
51bca7d8
authored
Jan 16, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tech(dataproxy): moves all parameters to Info call
parent
839eb970
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
pkg/api/dataproxy.go
+12
-2
No files found.
pkg/api/dataproxy.go
View file @
51bca7d8
...
...
@@ -18,6 +18,10 @@ import (
"github.com/grafana/grafana/pkg/util"
)
var
(
auditLogger
log
.
Logger
=
log
.
New
(
"data-proxy-log"
)
)
func
NewReverseProxy
(
ds
*
m
.
DataSource
,
proxyPath
string
,
targetUrl
*
url
.
URL
)
*
httputil
.
ReverseProxy
{
director
:=
func
(
req
*
http
.
Request
)
{
req
.
URL
.
Scheme
=
targetUrl
.
Scheme
...
...
@@ -133,7 +137,6 @@ func ProxyDataSourceRequest(c *middleware.Context) {
func
proxyLog
(
dataSourceType
string
,
c
*
middleware
.
Context
)
{
if
setting
.
DataProxyLogging
{
auditLogger
:=
log
.
New
(
"data-proxy-log"
,
"userid"
,
c
.
UserId
,
"orgid"
,
c
.
OrgId
,
"username"
,
c
.
Login
)
var
body
string
if
c
.
Req
.
Request
.
Body
!=
nil
{
...
...
@@ -142,6 +145,13 @@ func proxyLog(dataSourceType string, c *middleware.Context) {
body
=
string
(
buffer
)
}
auditLogger
.
Info
(
"Proxying incoming request"
,
"datasource"
,
dataSourceType
,
"uri"
,
c
.
Req
.
RequestURI
,
"method"
,
c
.
Req
.
Request
.
Method
,
"body"
,
body
)
auditLogger
.
Info
(
"Proxying incoming request"
,
"userid"
,
c
.
UserId
,
"orgid"
,
c
.
OrgId
,
"username"
,
c
.
Login
,
"datasource"
,
dataSourceType
,
"uri"
,
c
.
Req
.
RequestURI
,
"method"
,
c
.
Req
.
Request
.
Method
,
"body"
,
body
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment