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
b386920a
Commit
b386920a
authored
Feb 07, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'prometheus_secure' of
https://github.com/mtanda/grafana
into mtanda-prometheus_secure
parents
5e9653f9
69566a23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
pkg/api/dataproxy.go
+8
-0
No files found.
pkg/api/dataproxy.go
View file @
b386920a
...
...
@@ -6,6 +6,7 @@ import (
"net/http"
"net/http/httputil"
"net/url"
"strings"
"time"
"github.com/grafana/grafana/pkg/api/cloudwatch"
...
...
@@ -107,6 +108,13 @@ func ProxyDataSourceRequest(c *middleware.Context) {
proxyPath
:=
c
.
Params
(
"*"
)
if
ds
.
Type
==
m
.
DS_PROMETHEUS
{
if
!
(
c
.
Req
.
Request
.
Method
==
"GET"
&&
strings
.
Index
(
proxyPath
,
"api/"
)
==
0
)
{
c
.
JsonApiErr
(
403
,
"GET is only allowed on proxied Prometheus datasource"
,
nil
)
return
}
}
if
ds
.
Type
==
m
.
DS_ES
{
if
c
.
Req
.
Request
.
Method
==
"DELETE"
{
c
.
JsonApiErr
(
403
,
"Deletes not allowed on proxied Elasticsearch datasource"
,
nil
)
...
...
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