kevin
9c8f31cf83
can only specify one origin in cors
2020-10-21 16:47:49 +08:00
kevin
fe0d0687f5
support cors in rest server
2020-10-21 14:10:36 +08:00
kevin
737cd4751a
rename NewPatRouter to NewRouter
2020-10-20 14:23:21 +08:00
kingxt
aa3c391919
api add middleware support ( #140 )
...
* rebase upstream
* rebase
* trim no need line
* trim no need line
* trim no need line
* update doc
* remove update
* remove no need
* remove no need
* goctl add jwt support
* goctl add jwt support
* goctl add jwt support
* goctl support import
* goctl support import
* support return ()
* revert
* refactor and rename folder to group
* remove no need
* add anonymous annotation
* optimized
* rename
* rename
* update test
* api add middleware support: usage:
@server(
middleware: M1, M2
)
* api add middleware support: usage:
@server(
middleware: M1, M2
)
* simple logic
* should reverse middlewares
* optimized
* optimized
* rename
Co-authored-by: kingxt <dream4kingxt@163.com>
2020-10-19 18:34:10 +08:00
kevin
94645481b1
fix golint issues
2020-10-16 10:50:43 +08:00
kevin
20d53add46
update readme
2020-10-11 19:42:40 +08:00
kevin
adc275872d
add more tests
2020-10-10 11:53:49 +08:00
kevin
b8fcdd5460
add more tests
2020-10-01 17:50:53 +08:00
kevin
9277ad77f7
fix typo of prometheus
2020-09-27 17:15:15 +08:00
kevin
a958400595
rename prommetric to prometheous, add unit tests
2020-09-27 16:14:16 +08:00
kevin
be9c48da7f
add tracing logs in server side and client side
2020-09-22 17:34:39 +08:00
kevin
5e99f2b85d
add trace/span in http logs
2020-09-20 22:02:45 +08:00
kevin
86d3de4c89
use package level defined contextKey as context key
2020-09-20 12:46:35 +08:00
kevin
0b1ee79d3a
rename rpcx to zrpc
2020-09-18 11:41:52 +08:00
kevin
2b1466e41e
add more tests
2020-08-21 23:09:35 +08:00
kevin
9e14820698
fix golint warnings
2020-08-19 16:00:55 +08:00
kevin
054d9b5540
rename rest files
2020-08-18 20:20:44 +08:00
kevin
d6c7da521e
remove bodyless check
2020-08-12 14:44:09 +08:00
kevin
96b6d2ab58
parse body only if content length > 0
2020-08-12 14:37:34 +08:00
kevin
88a73f1042
return ErrBodylessRequest on get method etc.
2020-08-12 14:31:11 +08:00
kevin
80d55dbc02
export httpx.GetRemoteAddr
2020-08-12 12:25:52 +08:00
kevin
b541403ce2
export router
2020-08-12 12:16:36 +08:00
kevin
a7c02414f3
export token parser for refresh token service
2020-08-12 12:12:31 +08:00
kevin
c57051ce63
use strings.Contains instead of strings.Index
2020-08-11 17:18:51 +08:00
kevin
40895ba8d9
optimize reading http request body
2020-08-10 18:27:08 +08:00
kevin
215b4bae3b
check content length before reading
2020-08-10 17:55:19 +08:00
kevin
0a7e0cce77
update package reference
2020-08-08 16:40:10 +08:00
kim
44290aa4d6
refactor
2020-07-31 17:11:59 +08:00
kim
cf8e0a118f
refactor ngin to rest
2020-07-31 17:03:19 +08:00
kevin
b73684d9a6
move router to httpx
2020-07-31 12:13:30 +08:00
kevin
f372ded63c
rename ngin to rest
2020-07-31 11:45:16 +08:00
kevin
0897f60c5d
rename ngin to rest
2020-07-31 11:14:48 +08:00