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
166ce7d2
Commit
166ce7d2
authored
Jan 14, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Gzip option and the macaron Gzip middleware, but does not seem to work
parent
5833867b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
conf/grafana.ini
+1
-0
pkg/cmd/web.go
+3
-0
pkg/setting/setting.go
+2
-0
No files found.
conf/grafana.ini
View file @
166ce7d2
...
...
@@ -9,6 +9,7 @@ http_addr =
http_port
=
3000
router_logging
=
false
static_root_path
=
public
enable_gzip
=
false
[session]
; Either "memory", "file", default is "memory"
...
...
pkg/cmd/web.go
View file @
166ce7d2
...
...
@@ -39,6 +39,9 @@ func newMacaron() *macaron.Macaron {
m
:=
macaron
.
New
()
m
.
Use
(
middleware
.
Logger
())
m
.
Use
(
macaron
.
Recovery
())
if
setting
.
EnableGzip
{
m
.
Use
(
macaron
.
Gziper
())
}
mapStatic
(
m
,
""
,
"public"
)
mapStatic
(
m
,
"app"
,
"app"
)
...
...
pkg/setting/setting.go
View file @
166ce7d2
...
...
@@ -56,6 +56,7 @@ var (
CertFile
,
KeyFile
string
RouterLogging
bool
StaticRootPath
string
EnableGzip
bool
// Http auth
Anonymous
bool
...
...
@@ -164,6 +165,7 @@ func NewConfigContext() {
StaticRootPath
=
Cfg
.
MustValue
(
"server"
,
"static_root_path"
,
path
.
Join
(
WorkDir
,
"webapp"
))
RouterLogging
=
Cfg
.
MustBool
(
"server"
,
"router_logging"
,
false
)
EnableGzip
=
Cfg
.
MustBool
(
"server"
,
"enable_gzip"
)
// Http auth
Anonymous
=
Cfg
.
MustBool
(
"auth"
,
"anonymous"
,
false
)
...
...
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