Commit Graph
54 Commits
Author SHA1 Message Date
Federico Rampazzo 77aecc9e86 JWT support 2015-05-20 06:01:50 +01:00
Jonathan Daugherty 6dfbe854a0 Make postgrest show long help output with defaults on usage errors
This makes optparse-applicative show the long version of help output.
Its default behavior is not to do this since the showHelpOnError
setting defaults to False.  This turns it on.
2015-03-16 13:27:22 -07:00
Joe Nelson 3d3c7277c7 Allow user to override schema used for v1 of api 2015-03-03 22:29:37 -08:00
Joe Nelson 9b15071f23 Log requests
Fixes #141
2015-02-28 09:31:00 -08:00
Joe Nelson d77b6df851 Use new optparse-applicative and bcrypt
Fixes #131 and affects #129
2015-02-07 14:21:40 -08:00
Joe Nelson da6318f5a2 Fix warnings, lint, and ambiguous hasql imports 2015-01-28 20:37:19 -08:00
Adam C. Baker e1ad5cb1ae handle errors in the app too 2015-01-26 18:07:38 -08:00
Adam C. Baker ead346816b reporting errors, but not passing tests. 2015-01-26 17:31:59 -08:00
Joe Nelson b504473790 WIP: Upgrade to hasql 7
Still fails handling query errors
2015-01-25 18:33:50 -08:00
Joe Nelson 2c635cfde8 Optimization when auth role coincides with anon role
No need to set/reset role because it is already correct
2014-12-29 09:39:13 -08:00
Joe Nelson f689ce684a Provide proper JSON details for errors
Refines HTTP codes for server vs client problems

Fixes #92
Fixes #40
2014-12-21 19:34:21 -08:00
Joe Nelson dbe1f59066 Update project name in strings
Fixes #105
2014-12-17 10:24:24 -08:00
Joe Nelson 9712549d64 Use "::unknown" type casts to overcome binary protocol restrictions
Fixes #112
2014-12-16 20:09:01 -08:00
Joe Nelson 19b62c00ee Enclose entire app response in single Tx 2014-12-12 13:55:09 -08:00
Joe Nelson b302843e10 Parse args more sensibly, and use correct port for postgres connection 2014-12-07 18:42:18 -08:00
Joe Nelson 782d6520a2 Upgrade hasql to 0.4.0 2014-12-07 00:11:14 -08:00
Joe Nelson 4d8c508a17 Parse db uri again 2014-12-06 23:21:49 -08:00
Joe Nelson a45718e992 Re-enable authentication 2014-12-06 17:42:22 -08:00
Joe Nelson eb7e9586ab Handle missing table sql errors with 404 2014-12-06 17:42:20 -08:00
Joe Nelson da79f6cea1 Share connection pool with all http clients 2014-12-06 17:42:20 -08:00
Joe Nelson d2888c62f1 hasql wants to rowParse text not bytestring 2014-12-06 17:42:19 -08:00
Joe Nelson dcbecf085f Program compiles but without auth, uri parsing, or json error reporting 2014-12-06 17:42:19 -08:00
Joe Nelson 8ebfbccd08 WIP: converting to Hasql 2014-12-06 17:42:19 -08:00
Joe Nelson dd2adf4daa Tests compile, run, and fail
Temporarily disabled unit tests
2014-12-06 17:42:19 -08:00
Joe Nelson 1b8f0f2829 Main compiles. Still bugs though 2014-12-06 17:42:18 -08:00
Joe Nelson 0f849e9bf1 Move cors things to Main 2014-12-06 17:42:18 -08:00
Joe Nelson cb80dba234 WIP: converting app request handlers 2014-12-06 17:42:17 -08:00
Adam C. BakerandJoe Nelson 41a982fb31 Remove HDBC imports 2014-12-06 17:42:17 -08:00
Joe Nelson f58e3db924 Disable transactions for read-only requests 2014-11-06 14:19:19 -08:00
Adam C. Baker 74855db87b declare required extensions
and remove default extension pragmas (OverloadedStrings)
2014-11-05 00:32:10 -08:00
Joe Nelson 6a5b756cac Report server and version in headers 2014-10-28 17:17:37 -07:00
Adam C. Baker 2b829f9152 cleanup connections on close. 2014-10-28 14:41:32 -07:00
Joe Nelson 32e3396caf Provide command-line flag for db pool size 2014-10-21 16:15:11 -07:00
Adam C. Baker 0798cb81a6 App has database pools! 2014-10-17 17:16:41 -07:00
Adam C. Baker 49f0bf7c3f broken attempts to work on concurrency 2014-10-17 17:10:34 -07:00
Joe Nelson 2338d000e1 Added a favicon, so important!
Fixes #71
2014-10-14 11:13:55 -07:00
Adam C. Baker 5630ee52fd Merge branch 'master' into errors
Conflicts:
	src/Main.hs
	src/Middleware.hs
2014-10-13 17:45:32 -07:00
Adam C. Baker f81ca8bf0b move auth out of dbapi, use middleware, put in main 2014-10-13 16:52:14 -07:00
Joe Nelson abccb295a3 Remove internal TLS, add option for HTTPS redirection 2014-10-12 19:52:20 -07:00
Adam C. Baker a984fe3bf9 flip args to inTransaction 2014-10-10 17:32:17 -07:00
Adam C. Baker e4669dcb37 handle all requests in a transaction. 2014-10-10 17:16:56 -07:00
Adam C. Baker 0879ed7110 flip app args 2014-10-10 15:54:05 -07:00
Joe Nelson 527d51670c WIP: Trap postgres errors in middleware
Fixes #39
2014-10-08 14:58:38 -07:00
Joe Nelson 2f37b6caeb Rudimentary cors feature spec 2014-10-03 16:00:06 -07:00
Adam C. BakerandJoe Nelson dac9f02578 allow options, capital Authorization. 2014-10-03 14:47:29 -07:00
Adam C. BakerandJoe Nelson 0067f60316 first pass at CORS handling. 2014-10-03 14:47:29 -07:00
Joe Nelson 6b325e0139 Make the anonymous pg role a mandatory argument 2014-10-03 13:56:02 -07:00
Joe Nelson 598d70579e WIP: change db roles based on HTTP basic auth headers 2014-09-29 22:52:02 -07:00
Joe Nelson e5c4567166 Gzip compression 2014-09-29 14:06:42 -07:00
Joe Nelson 2f584be0d6 HTTPS only 2014-09-29 14:06:20 -07:00