26 Commits

Author SHA1 Message Date
4d87cb03c5 Simplify make() (gosimple)
This fixes:
pkg/api/http_server.go:142:89: should use make(map[string]func(*http.Server, *tls.Conn, http.Handler)) instead (S1019)
pkg/services/alerting/scheduler.go:18:30: should use make(map[int64]*Job) instead (S1019)
pkg/services/alerting/scheduler.go:26:31: should use make(map[int64]*Job) instead (S1019)
2018-04-16 21:04:57 +02:00
6f363153d7 Adjust permissions of unix socket
fixes #8358
2018-03-23 16:09:04 +01:00
0a415c50d0 Make golint happier 2018-03-22 22:38:44 +01:00
7aab6a8887 Make golint happier 2018-03-22 12:40:21 +01:00
3ca1e06509 session: fork Macaron mysql session middleware
This changes forks the mysql part of the Macaron session middleware.

In the forked mysql file:

- takes in a config setting for SetConnMaxLifetime (this solves wait_timeout
problem if it is set to a shorter interval than wait_timeout)
- removes the panic when an error is returned in the Exist function.
- retries the exist query once
- retries the GC query once
2018-03-16 01:19:28 +01:00
c82e23d96e imguploader: Add support for new internal image store (#6922) 2018-01-12 21:40:12 +01:00
f7ed24475c wait for all sub routines to finish
simple solution for waiting for all go sub routines to
finish before closing Grafana. We would use errGroup
here as well but I dont like spreading context's all
over the place.

closes #10131
2017-12-11 08:53:06 +01:00
3a772c7f7f allows head requests for /api/health endpoint
closes #9955
2017-11-21 15:03:04 +01:00
0d85c63fff middleware: recovery handles panics in all handlers
Also, changes the order of the middleware so that recovery is after the
gzip middleware. Otherwise, a 200 OK is returned instead of a 500 error.
2017-11-15 13:57:33 +01:00
139f077453 prometheus: enable gzip for /metrics endpoint
closes #9464
2017-10-23 09:35:46 +02:00
b5727949fd logging: dont use cli logger in http_server 2017-10-12 15:29:01 +02:00
ee5f69beb4 metrics: disable gzip for /metrics endpoint (#9468)
Prometheus client lib support gzip by itself. Which caused the
response to be double gzipped sometimes. We should use the Grafana
middle ware instead.

closes #9464
2017-10-12 12:02:36 +02:00
4bc6ecb241 adds metric middlware to route register 2017-09-14 14:26:32 +02:00
6d22a67a30 return /metrics before session middleware 2017-09-14 14:26:32 +02:00
4f9fbcc211 dataproxy: added caching of datasources when doing data proxy requests, #9078 2017-08-23 13:31:26 +02:00
74093c700f api: adds no-cache header for GET requests
Fixes #5356. Internet Explorer aggressively caches GET requests which
means that all API calls fetching data are cached. This fix adds a
Cache-Control header with the value no-cache to all GET requests to
the API.
2017-07-04 21:26:05 +02:00
0eb297822c httpserver: fixes #8641
Changes to the http_server class meant that the TLS settings were not
getting applied anymore. This fixes so that the minimum TLS version is
1.2 again.
2017-06-17 23:10:12 +02:00
4a35126bf6 api: health check returns 503 if db is failing
ref #3302
2017-05-10 15:23:59 +02:00
c92d719a72 added support for listening on unix socket #4030 (#8221) 2017-04-27 08:54:21 +02:00
19a04b7e4a change: minor change to health check api endpoint 2017-04-25 17:24:36 +02:00
f6f2d85aa7 change: minor change to health check api endpoint 2017-04-25 17:24:06 +02:00
368e847d12 feat: added api health endpoint that does not require auth and never creates sessions, returns db status as well. #3302 2017-04-25 17:17:45 +02:00
5174d050f2 middlware: change org when url contains orgid
closes #6948
ref #1613
2017-02-17 15:02:14 +01:00
cf871b1284 http: close http server gracefully. 2017-02-17 10:33:47 +01:00
4fcd5eab29 Add advanced TLS settings to harden setup. (#7347)
* Hardcoded the most secured TLS options.
2017-02-15 14:29:20 +01:00
fad07f0d15 refactor(http): refactoring http server 2016-12-21 14:36:32 +01:00