Commit Graph

417 Commits

Author SHA1 Message Date
Gerasimos (Makis) Maropoulos
28af63fd84
minor 2022-03-06 21:15:11 +02:00
Gerasimos (Makis) Maropoulos
a5c43f1d9d
As the default value is TLS 1.0, which is considered insecure, it is recommended to explicitly set the MinVersion to a secure version of TLS 2022-03-06 19:43:09 +02:00
Gerasimos (Makis) Maropoulos
e2222a8066
fix #1852 2022-03-03 02:34:23 +02:00
Gerasimos (Makis) Maropoulos
f28203f1be
add Context.ReadMultipartRelated as requested at #1787 2022-03-02 03:49:15 +02:00
Gerasimos (Makis) Maropoulos
61872a1612
Add Party.Container.SetDependencyMatcher, hero.Container.DependencyMatcher and hero.Dependency.Match to fullfil the feature request asked at: #1842 2022-03-01 21:26:02 +02:00
Gerasimos (Makis) Maropoulos
20fa672097
fix 2 minor issues 2022-02-26 21:16:08 +02:00
Gerasimos (Makis) Maropoulos
d6cfe3fe5b
new Timeout, TimeoutMessage configuration fields and apps.OnApplicationRegistered listener 2021-12-09 14:44:03 +02:00
Gerasimos (Makis) Maropoulos
bf54d33a3e
add new ':email' path parameter and revert the jsoniter removal 2021-10-13 16:22:22 +03:00
Gerasimos (Makis) Maropoulos
11c1301cda
minor 2021-09-14 21:50:39 +03:00
Kim
78108ac96c remove extra newline 2021-08-12 14:09:44 +02:00
Kim
b4c9e7124a fix macos panic dereferencing when passing a []byte version of certificate or key as cert|keyFileOrContents to iris.TLS()
if len(certFileOrContents) > 1024 the error returned will be Filename too long and os.IsNotExist(err) will be false
2021-08-12 14:03:40 +02:00
Gerasimos (Makis) Maropoulos
574db973d0
improve Context.Proceed
Now this is possible: ok := (Handler1) && ctx.Proceed(Handler2)) || ctx.Proceed(Handler3)
2021-06-15 00:36:28 +03:00
Gerasimos (Makis) Maropoulos
a3b5797e54
add a shortcut for ConfigureContainer().Use as UseFunc on Party 2021-06-11 11:11:36 +03:00
Gerasimos (Makis) Maropoulos
96c2dec47f
dependency injection: func (...<T>) iris.Handler can be generated to a simple iris handler if <T> are static dependencies 2021-06-10 21:16:00 +03:00
Gerasimos (Makis) Maropoulos
8f9140b705
New Context.FormFiles method 2021-06-07 15:33:19 +03:00
Gerasimos (Makis) Maropoulos
6219e57135
New APIContainer.EnableStrictMode(bool) method. Read HISTORY.md 2021-04-22 14:00:00 +03:00
Gerasimos (Makis) Maropoulos
43079f75d2
godoc: minor 2021-04-22 11:52:25 +03:00
Gerasimos (Makis) Maropoulos
ce6c455601
add Party.RemoveRoute method as requested in the community chat 2021-04-04 20:24:21 +03:00
Gerasimos (Makis) Maropoulos
2b5495e960
Merge pull request #1742 from tuhao1020/master
bug fix #1741 #1744
2021-03-18 20:52:10 +02:00
tuhao
71f1d86420 add a tls.Config parameter for reverse proxy 2021-03-12 13:20:21 +08:00
tuhao
84581e5314 bug fix #1741 2021-03-10 13:03:20 +08:00
Gerasimos (Makis) Maropoulos
89f02c6e87
update jwt dependency and use the current Party if relative path is empty on PartyConfigure only 2021-03-03 14:39:47 +02:00
Gerasimos (Makis) Maropoulos
c1b31ab102
PartyConfigure: try to bind the struct's exported zero fields based on the registered dependencies (if any)
If the PartyConfigurator value accepts only static dependencies then we have zero performance penalty, exactly like a Controller (structure) works
2021-02-21 22:24:01 +02:00
Gerasimos (Makis) Maropoulos
f34703e3cf
minor improvement of the previous commit 2021-02-17 16:57:19 +02:00
Gerasimos (Makis) Maropoulos
cbf70a7bcf
Add new PartyConfigure helper 2021-02-17 16:50:36 +02:00
Gerasimos (Makis) Maropoulos
5994fd5d4e
New iris.WithKeepAlive(time.Duration) Configurator is added as a helper to enable TCP listener featured with keep-alive 2021-01-31 21:24:15 +02:00
tuhao
33344283b8 use DirOptions.ShowHidden in DirListRich 2021-01-29 01:10:40 +08:00
tuhao
8b2bdd0dc2 modifiy DirList's default html format 2021-01-28 23:38:05 +08:00
Gerasimos (Makis) Maropoulos
f7757c0793
fix https://github.com/kataras/iris/issues/1713 and add a simple usage example of the 'RemoveHandler' 2021-01-27 01:22:20 +02:00
Gerasimos (Makis) Maropoulos
435f284815
New feature: Fallback views. Read HISTORY.md 2021-01-24 14:08:37 +02:00
tuhao
cc69d05727 udpate modifyProxiedRequest 2021-01-22 01:11:25 +08:00
Gerasimos (Makis) Maropoulos
6c823e4864
Add example for #1706 (we already cover that functionality through the rest of the examples, but make it clear for newcomers that, dependencies can be used for that kind of reasons as well) 2021-01-21 05:57:37 +02:00
Gerasimos (Makis) Maropoulos
e990b23a64
Merge pull request #1703 from tuhao1020/master
update host.ProxyHandler to compatiable with different hosts in target url and request host
2021-01-21 05:25:43 +02:00
Gerasimos (Makis) Maropoulos
9f6a75f7c4
Expose the ConfigureContainer().Handle as Application/Party.HandleFunc to make it easier for developers to catch up 2021-01-21 01:36:11 +02:00
tuhao
9eb7d9386d add ProxyHandlerRemote and NewProxyRemote 2021-01-16 11:49:33 +08:00
tuhao
93fa23befa update TestProxy 2021-01-11 17:03:22 +08:00
tuhao
b6ebc39b9e update host.ProxyHandler to compatiable with different host in target url 2021-01-11 15:25:32 +08:00
Gerasimos (Makis) Maropoulos
8aedf6bc32
:) 2021-01-09 05:41:20 +02:00
Gerasimos (Makis) Maropoulos
387eac8672
Merge branch 'master' into master 2021-01-09 03:37:54 +02:00
Gerasimos (Makis) Maropoulos
240fdb6dc3
API versioning improvements
Replace the go-version package with a regex-free alternative semver

the result: versioned apis have almost zero performance cost now

thanks @motogo for your kind donation ❤️ - please check your github notifications
2021-01-07 04:14:41 +02:00
Shubhendra Singh Chauhan
8ab500bd6c fixed code quality issues using DeepSource
* Combine multiple `append`s into a single call

* Remove unnecessary use of slice

* Replace `strings.Index` with `strings.Contains`

* Added .deepsource.toml config file for DeepSource integration
2021-01-06 16:36:10 +05:30
Gerasimos (Makis) Maropoulos
b409f7807e
New feature: versioning.Aliases
Thanks @mulyawansentosa and @remopavithran for your donates ❤️
2021-01-06 01:52:39 +02:00
Gerasimos (Makis) Maropoulos
4d09475c29
fix https://github.com/kataras/iris/issues/1672 2020-11-13 20:11:55 +02:00
Gerasimos (Makis) Maropoulos
c81b97188a
add example for https://github.com/kataras/iris/issues/1671 2020-11-13 00:34:17 +02:00
Gerasimos (Makis) Maropoulos
7a19cfb211
add DirOptions.SPA field
relative to #1653
2020-11-07 00:08:49 +02:00
Gerasimos (Makis) Maropoulos
1864f99145
New JWT features and changes (examples updated). Improvements on the Context User and Private Error features
TODO: Write the new e-book JWT section and the HISTORY entry of the chnages and  add a simple example on site docs
2020-10-17 06:40:17 +03:00
Gerasimos (Makis) Maropoulos
546c7bf465
add RemoveHandler to Party too, as requested at #1658 2020-10-12 12:56:54 +03:00
Gerasimos (Makis) Maropoulos
ff7417badd
Add Route.RemoveHandler (a fast change to the previous commit) 2020-10-09 18:53:00 +03:00
Gerasimos (Makis) Maropoulos
ae8190eb97
add Route.RemoveMiddleware method
Useful when all routes under a Party accept a middleware with some exceptions.

For Party-level use its Reset method instead, unless otherwise requested
2020-10-09 18:31:38 +03:00
Gerasimos (Makis) Maropoulos
4065819688
New: i18n pluralization and variables support and more...
fixes: #1649, #1648, #1641, #1650

relative to: #1597
2020-09-29 19:19:19 +03:00
Gerasimos (Makis) Maropoulos
a04a6b5011
add accesslog+proxy example 2020-09-19 17:47:44 +03:00
Gerasimos (Makis) Maropoulos
64f95a59b4
fix ip_test (see prev commit) 2020-09-16 13:21:34 +03:00
Gerasimos (Makis) Maropoulos
373b8993ad
add viper configuration example and minor improvements - read HISTORY.md 2020-09-16 12:59:51 +03:00
Gerasimos (Makis) Maropoulos
e828a96752
fix #1633 and respect controller's no log option for websocket controllers too 2020-09-15 23:37:11 +03:00
Gerasimos (Makis) Maropoulos
3baee7db34
add Party.SetRoutesNoLog and mvc.Application.SetControllersNoLog as requested at #1630 2020-09-15 00:23:09 +03:00
Gerasimos (Makis) Maropoulos
e63d1041d2
accesslog: add IP in builtin fields, change the format a bit. Default func: remove compression middleware, force-set debug log level, replace the old request logger with the accesslog one, use request id middlewareand keep recovery 2020-09-11 09:38:55 +03:00
Gerasimos (Makis) Maropoulos
16a794a245
acesslog new example: custom fields and custom template 2020-09-10 21:40:30 +03:00
Gerasimos (Makis) Maropoulos
ae67987f55
accesslog: log error bodies and communicate with the recover middleware 2020-09-10 14:47:14 +03:00
Gerasimos (Makis) Maropoulos
0be856e54c
add accesslog middleware (rel: #1601) 2020-09-06 10:38:48 +03:00
Gerasimos (Makis) Maropoulos
e1f25eb098
Full support of the http.FileSystem on all view engines as requested at #1575
Also, the HandleDir accepts both string and http.FileSystem (interface{}) (like the view's fs)
2020-09-05 08:34:09 +03:00
Gerasimos (Makis) Maropoulos
d0a27d2c08
add a simple URLParamSlice
I would love to change the current URLParams() to URLParams(name string) []string to match the PostValues(name string) []string, error but that would be a big breaking changes to many servers... so stick with it.
2020-08-31 05:07:55 +03:00
Gerasimos (Makis) Maropoulos
00684f9d2e
add Route.ExcludeSitemap method to exclude a route from sitemap, also exclude the offline routes as requested 2020-08-29 01:21:42 +03:00
Gerasimos (Makis) Maropoulos
6f9a453160
DBUG API: mark overlapped routes, hide the builtin functionality (read description)
also reference the correct file:line on <autogenerated> (by searching for the file,line of method inside the embedded fields themselves, as go automatically generates the methods foreach struct for their embedded fields)

fix UseGlobal may override the overlap feature
2020-08-28 16:02:14 +03:00
Gerasimos (Makis) Maropoulos
4035ed308c
fix https://github.com/kataras/iris/issues/1608 with the help of @AlbinoGeek for monitoring and together found the source of the problem 2020-08-28 06:21:26 +03:00
Gerasimos (Makis) Maropoulos
a6ec94e1a6
overlap routing: and mvc: allow setting status code from a dependency or a middleware 2020-08-28 04:11:56 +03:00
Gerasimos (Makis) Maropoulos
933534574a
fix #1603 2020-08-28 02:22:38 +03:00
Gerasimos (Makis) Maropoulos
39e3911d41
fix future issues like #1607 2020-08-27 07:23:56 +03:00
Gerasimos (Makis) Maropoulos
d44b69faed
Add Party.ResetRouterFilters
relative to: https://github.com/kataras/iris/issues/1604#issuecomment-680410131
2020-08-26 06:57:36 +03:00
Gerasimos (Makis) Maropoulos
1780d97d44
update the subdomain redirect example using the rewrite middleware 2020-08-26 00:07:07 +03:00
Gerasimos (Makis) Maropoulos
5e82fa5b89
mvc: struct field and method dependency logs on debug level. Read HISTORY.md
- remove Party.GetReporter

- Read HISTORY.md
2020-08-24 21:44:29 +03:00
Gerasimos (Makis) Maropoulos
ef5685bf7e
add Iris + Serverless example link 2020-08-23 17:55:29 +03:00
Gerasimos (Makis) Maropoulos
8e049d77c9
HandleHTTPError MVC Method as requested at #1595. Read HISTORY.md
example at: https://github.com/kataras/iris/tree/master/_examples/mvc/error-handler-http
2020-08-22 08:04:22 +03:00
Gerasimos (Makis) Maropoulos
a018ba9b0a
add example for #1601 2020-08-22 03:21:44 +03:00
Gerasimos (Makis) Maropoulos
27686d7c1c
... 2020-08-21 20:48:41 +03:00
Gerasimos (Makis) Maropoulos
ffae9c0d09
rewrite middleware: add PrimarySubdomain and simplify its usage example 2020-08-20 03:05:47 +03:00
Gerasimos (Makis) Maropoulos
12737c5b7f
implement a rewrite middleware 2020-08-19 22:40:17 +03:00
Gerasimos (Makis) Maropoulos
bdb94bbae2
request logger middleware: add graphical information about executed route's handlers 2020-08-19 01:24:36 +03:00
Gerasimos (Makis) Maropoulos
1192e6f787
fix https://github.com/kataras/iris/issues/1594 2020-08-18 05:42:48 +03:00
Gerasimos (Makis) Maropoulos
5481b9a6c1
apps.Switch(apps.Hosts...) example 2020-08-18 04:17:53 +03:00
Gerasimos (Makis) Maropoulos
589c8c6242
new apps/switch (beta) 2020-08-17 21:53:17 +03:00
Gerasimos (Makis) Maropoulos
a61f743fa8
add internal subdomain redirect handler
TODO more things
2020-08-16 20:16:49 +03:00
Gerasimos (Makis) Maropoulos
177b05b674
see prev commit 2020-08-16 18:09:10 +03:00
Gerasimos (Makis) Maropoulos
227170fd33
see https://github.com/kataras/iris/issues/1591#issuecomment-674473247 2020-08-16 18:04:52 +03:00
Gerasimos (Makis) Maropoulos
889b7942d3
add two new examples and share the app's specific logger instance with sessions databases and APIBuilder 2020-08-16 07:07:36 +03:00
Gerasimos (Makis) Maropoulos
c22cb3a188
add godocs for https://github.com/kataras/iris/issues/1589 2020-08-15 12:24:51 +03:00
Gerasimos (Makis) Maropoulos
8340285e7d
fix #1588 2020-08-15 12:17:48 +03:00
Gerasimos (Makis) Maropoulos
d0d7679a98
minor 2020-08-14 14:18:41 +03:00
Gerasimos (Makis) Maropoulos
9f0872719f
fix SubdomainRedirect on loopbacks
fix: https://github.com/kataras/iris/issues/1584#issuecomment-674001454
2020-08-14 14:14:29 +03:00
Gerasimos (Makis) Maropoulos
dc35391ceb
fix https://github.com/kataras/iris/issues/1584 2020-08-14 13:04:48 +03:00
Gerasimos (Makis) Maropoulos
5f235993ee
fix Context.Proceed called on last handler in the chain
relative: https://github.com/kataras/iris/issues/1581#issuecomment-673958152
2020-08-14 11:53:38 +03:00
Gerasimos (Makis) Maropoulos
6fee09f11e
fix #1580 2020-08-14 03:19:59 +03:00
Gerasimos (Makis) Maropoulos
ff5e43f341
AutoTLS: allow fallback servers to not run on :80 2020-08-13 07:24:46 +03:00
Gerasimos (Makis) Maropoulos
0edf0affb0
friendly name displayed on AutoTLS as suggested at #1578 2020-08-12 08:18:31 +03:00
Gerasimos (Makis) Maropoulos
9ed566b076
re-add the mutex on sessions.LifeTime 2020-08-12 07:48:45 +03:00
Gerasimos (Makis) Maropoulos
0761bc35ee
General Improvements (UseRouter per Party, fix AutoTLS). Read HISTORY.md
relative to: https://github.com/kataras/iris/issues/1577 and https://github.com/kataras/iris/issues/1578
2020-08-12 07:20:07 +03:00
Gerasimos (Makis) Maropoulos
da029d6f37
New 'Application.UseRouter(...Handler)'. Read HISTORY.md 2020-08-09 22:28:44 +03:00
Gerasimos (Makis) Maropoulos
46a3a99adf
various improvements and new 'UseOnce' method - read HISTORY.md 2020-08-06 03:35:58 +03:00
Gerasimos (Makis) Maropoulos
5d480dc801
Ability to register a view engine per group of routes or for the current a chain of handlers
Example at: https://github.com/kataras/iris/tree/master/_examples/view/context-view-engine
2020-08-05 19:34:55 +03:00
Gerasimos (Makis) Maropoulos
802348cedd fix https://github.com/kataras/iris/issues/1569#issuecomment-663739177
Former-commit-id: c55f1023f4d93f6712c7fa4d299bcf1098872ecf
2020-07-25 09:23:34 +03:00
Gerasimos (Makis) Maropoulos
2f8b29cb3d examples: use ctx.ResponseWriter().Naive().(http.Pusher) instead
Former-commit-id: 7802f4eadf2b1c0a0d2a42ed5ebac3e5c77f88cc
2020-07-24 22:36:46 +03:00