Commit Graph

47 Commits

Author SHA1 Message Date
Sandro Santilli
4a6af108b4 Fix use of maxUserTemplate configuration variable 2014-02-13 15:01:58 +01:00
Sandro Santilli
e4cd37647e Allow limiting number of allowed user templates
Adds maxUserTemplates directive.
Closes #136
2014-02-13 14:55:31 +01:00
Sandro Santilli
bf45bbea56 Do not send multiple equal commands to Varnish on connect
Closes #135
Also accept varnish "secret" in config
2014-02-12 16:14:27 +01:00
Sandro Santilli
a948038ff4 Disable debug logging unless "debug" config param evaluates to true
Closes #137
2014-02-11 16:34:43 +01:00
Sandro Santilli
747f4803ba Include hash of template in the maptoken returned from instanciation
Doing so basically removes the need to include the template identifier
in the surrogate keys of the responses for resources fetched via
the instance whenever template is updated. See #105
2014-02-10 15:30:35 +01:00
Sandro Santilli
6b41fef96c Fix sendError calls to receive the full Error instance 2014-02-10 11:11:35 +01:00
Sandro Santilli
fe6e915c0d Always set database access parameters from req2params
Fixes privileged database access from unauthorized users while
fetching torque tiles or feature attributes (unreleased feature).
Closes #132.

Includes testcase, which closes #119
2014-02-07 18:08:41 +01:00
Sandro Santilli
9018e39762 Make endpoints configurable
Closes #127
Uses /api/v1/maps* in the production and staging example configs,
keeps /maps* for development and test (they are examples...)
2014-02-05 15:14:47 +01:00
Sandro Santilli
a964ed5fe6 Implement Unified Map API
Closes #126
2014-02-04 19:04:59 +01:00
javi
7197cc2d62 added stack to response in development mode 2014-02-04 14:58:21 +01:00
Sandro Santilli
d32278b227 Rename template instanciation function 2014-01-29 14:30:27 +01:00
javi
ad0b2ffc8e added support for template instanciation with jsonp closes #116 2014-01-29 13:11:37 +01:00
Sandro Santilli
67e4e7e99b Set api_key to signer's when instanciating a template map
Closes #114
2014-01-28 12:37:41 +01:00
javi
e4e08db0b4 Merge branch 'master' of github.com:Vizzuality/Windshaft-cartodb 2014-01-22 19:10:37 +01:00
javi
164d952e56 support CORS in template instanciation endpoint, fixes #113 2014-01-22 19:10:09 +01:00
Sandro Santilli
f89fd98ed7 Expect malformed response objects (#109)
Include test for sql errors on layergroup creation
Closes #109
2014-01-15 11:53:19 +01:00
Sandro Santilli
d6fe5339cf Do not choke on headers cleanup when response headers are not set
Raise a WARNING instead.
See #107 (github) and CDB-1438 (JIRA)
2014-01-13 18:56:09 +01:00
Sandro Santilli
2690ef3f05 Drop cache headers from error responses.
Closes #107 (github), #resolve CDB-1423 (JIRA)
2014-01-13 11:20:02 +01:00
Sandro Santilli
0f90d687c7 Implement signed teplate maps
Closes #98

Raises minimum required redis version to 2.4.0+ (Debian stable has 2.4.14)
2013-12-17 17:39:21 +01:00
Sandro Santilli
7b7408dab7 Revert "Drop /map_metadata API entry point"
This reverts commit b37b07a06a1dd3cf05d60f4aa613ab5c48b90700.

This was too light of a decision...
2013-12-17 17:17:17 +01:00
Sandro Santilli
9c897a91a9 Drop /map_metadata API entry point
Closes #101
2013-12-17 17:17:17 +01:00
Sandro Santilli
a27cf1b41c Do not let anonymous requests use authorized renderer caches
Puts dbuser in params, for correct use by Windshaft renderer cache.
Before this fix, and after commit 1c9f63c9, the renderer cache key
did not contain the db user.
2013-12-17 17:17:12 +01:00
Sandro Santilli
3ff3dc2c97 Cleanup, handle error in req2param on flushCache 2013-03-15 19:25:13 +01:00
Sandro Santilli
ab8cb5bbb3 Add Windshaft-cartodb version to the /version route 2012-10-15 17:03:57 +02:00
Sandro Santilli
20dca2e8f8 Use windshaft-0.6.2 sendError function to send non-200 responses
Ensures all errors are logged
2012-10-11 16:48:41 +02:00
Sandro Santilli
7196c8c285 Only invalidate cache on del style when caching is enabled 2012-10-05 16:55:58 +02:00
Sandro Santilli
bc506784ca Add an X-Cache-Channel header to all GET requests. Closes #53. 2012-09-25 09:27:03 +02:00
Sandro Santilli
87b0e07815 Expose Varnish cache TTL in configuration. Closes #46 2012-09-03 18:57:35 +02:00
Sandro Santilli
1c9f63c901 Add XML processor to change database user when authenticated 2012-09-03 14:54:23 +02:00
Sandro Santilli
b30c8d9a98 Send jsQuery ready error message on GET /infowindow errors 2012-08-14 20:00:26 +02:00
Sandro Santilli
fb3f3a312e Really fix setting or deleting styles from unauth. request
Closes #44
2012-08-14 16:15:41 +02:00
Sandro Santilli
b5348db94c Add CORS headers to all requests
In addition to the ones served by the base Windshaft server this commit
adds CORS headers to the GET /infowindow, GET /map_metadata and
DEL /flush_cache requests. Closes issue #42.
2012-08-14 14:50:18 +02:00
Sandro Santilli
282ac94e29 Prevent unauthenticated requests from changing map styles 2012-08-07 17:10:15 +02:00
Sandro Santilli
6a92fd3170 Propagate style changes to caches for unauthenticated requests
Closes #41, does it implementing the new afterStyleChange and
afterStyleDelete callbacks in Windshaft 0.4.10.

Adds automated testcases for the bug.
2012-08-07 16:11:49 +02:00
Simon Tokumine
4078098c3f enable cache clearing at table level granularity 2012-05-02 19:32:54 +01:00
Simon Tokumine
78d415569d pin to mapnik 2.0, enable passing style via url 2011-12-09 00:32:32 +00:00
Simon Tokumine
5fbd3a376e cache age of 60 mins 2011-12-06 21:46:17 +00:00
Simon Tokumine
473a2d55a5 reinstate 304 2011-12-06 17:13:56 +00:00
Simon Tokumine
74cd176eb5 reconnect if varnish is down 2011-12-06 16:32:23 +00:00
Simon Tokumine
37cf676063 set last modified and cache control for varnish 2011-12-06 01:46:02 +00:00
javi santana
f4f7f6300d fixed log 2011-11-30 20:00:41 +01:00
javi santana
8474425375 added varnish invalidation code 2011-11-30 19:59:28 +01:00
javi
cb69faffc0 added X-Cache-Channel header so the tile cache could be invalidated using that key
for the moment we're using the database name as 
cache key, it is not the best solution because all
the tiles for that database will be invalidated 
when a change is done in any table. Doing this we
avoid getting wrong data when user gets tiles which
come from a query with joins.
2011-11-29 21:19:10 +01:00
Simon Tokumine
4347589826 update status codes 2011-11-21 22:29:35 +00:00
javi
9c5718a427 ttl options and tests 2011-10-21 16:52:07 +02:00
javi santana
b4a0732120 added more cache stats 2011-10-13 16:20:29 +02:00
javi santana
c1ba45cf5a included LRU cache with redis invalidation 2011-10-13 13:17:00 +02:00