1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-10 05:25:58 +00:00

rename master branch to main

This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-08-20 03:12:46 +03:00
parent 2e9745a915
commit 48f7b38d15
62 changed files with 216 additions and 211 deletions

View File

@@ -3,17 +3,17 @@ Builtin Handlers
| Middleware | Example |
| -----------|-------------|
| [rewrite](rewrite) | [iris/_examples/routing/rewrite](https://github.com/kataras/iris/tree/master/_examples/routing/rewrite) |
| [basic authentication](basicauth) | [iris/_examples/auth/basicauth](https://github.com/kataras/iris/tree/master/_examples/auth/basicauth) |
| [request logger](logger) | [iris/_examples/logging/request-logger](https://github.com/kataras/iris/tree/master/_examples/logging/request-logger) |
| [HTTP method override](methodoverride) | [iris/middleware/methodoverride/methodoverride_test.go](https://github.com/kataras/iris/blob/master/middleware/methodoverride/methodoverride_test.go) |
| [profiling (pprof)](pprof) | [iris/_examples/pprof](https://github.com/kataras/iris/tree/master/_examples/pprof) |
| [Google reCAPTCHA](recaptcha) | [iris/_examples/auth/recaptcha](https://github.com/kataras/iris/tree/master/_examples/auth/recaptcha) |
| [hCaptcha](hcaptcha) | [iris/_examples/auth/recaptcha](https://github.com/kataras/iris/tree/master/_examples/auth/hcaptcha) |
| [recovery](recover) | [iris/_examples/recover](https://github.com/kataras/iris/tree/master/_examples/recover) |
| [rate](rate) | [iris/_examples/request-ratelimit](https://github.com/kataras/iris/tree/master/_examples/request-ratelimit) |
| [jwt](jwt) | [iris/_examples/auth/jwt](https://github.com/kataras/iris/tree/master/_examples/auth/jwt) |
| [requestid](requestid) | [iris/middleware/requestid/requestid_test.go](https://github.com/kataras/iris/blob/master/_examples/middleware/requestid/requestid_test.go) |
| [rewrite](rewrite) | [iris/_examples/routing/rewrite](https://github.com/kataras/iris/tree/main/_examples/routing/rewrite) |
| [basic authentication](basicauth) | [iris/_examples/auth/basicauth](https://github.com/kataras/iris/tree/main/_examples/auth/basicauth) |
| [request logger](logger) | [iris/_examples/logging/request-logger](https://github.com/kataras/iris/tree/main/_examples/logging/request-logger) |
| [HTTP method override](methodoverride) | [iris/middleware/methodoverride/methodoverride_test.go](https://github.com/kataras/iris/blob/main/middleware/methodoverride/methodoverride_test.go) |
| [profiling (pprof)](pprof) | [iris/_examples/pprof](https://github.com/kataras/iris/tree/main/_examples/pprof) |
| [Google reCAPTCHA](recaptcha) | [iris/_examples/auth/recaptcha](https://github.com/kataras/iris/tree/main/_examples/auth/recaptcha) |
| [hCaptcha](hcaptcha) | [iris/_examples/auth/recaptcha](https://github.com/kataras/iris/tree/main/_examples/auth/hcaptcha) |
| [recovery](recover) | [iris/_examples/recover](https://github.com/kataras/iris/tree/main/_examples/recover) |
| [rate](rate) | [iris/_examples/request-ratelimit](https://github.com/kataras/iris/tree/main/_examples/request-ratelimit) |
| [jwt](jwt) | [iris/_examples/auth/jwt](https://github.com/kataras/iris/tree/main/_examples/auth/jwt) |
| [requestid](requestid) | [iris/middleware/requestid/requestid_test.go](https://github.com/kataras/iris/blob/main/_examples/middleware/requestid/requestid_test.go) |
Community made
------------
@@ -38,14 +38,14 @@ Most of the experimental handlers are ported to work with _iris_'s handler form,
Third-Party Handlers
------------
Iris has its own middleware form of `func(ctx iris.Context)` but it's also compatible with all `net/http` middleware forms. See [here](https://github.com/kataras/iris/tree/master/_examples/convert-handlers).
Iris has its own middleware form of `func(ctx iris.Context)` but it's also compatible with all `net/http` middleware forms. See [here](https://github.com/kataras/iris/tree/main/_examples/convert-handlers).
Here's a small list of useful third-party handlers:
| Middleware | Description |
| -----------|-------------|
| [goth](https://github.com/markbates/goth) | OAuth, OAuth2 authentication. [Example](https://github.com/kataras/iris/tree/master/_examples/auth/goth) |
| [permissions2](https://github.com/xyproto/permissions2) | Cookies, users and permissions. [Example](https://github.com/kataras/iris/tree/master/_examples/auth/permissions) |
| [goth](https://github.com/markbates/goth) | OAuth, OAuth2 authentication. [Example](https://github.com/kataras/iris/tree/main/_examples/auth/goth) |
| [permissions2](https://github.com/xyproto/permissions2) | Cookies, users and permissions. [Example](https://github.com/kataras/iris/tree/main/_examples/auth/permissions) |
| [csp](https://github.com/awakenetworks/csp) | [Content Security Policy](https://www.w3.org/TR/CSP2/) (CSP) support |
| [delay](https://github.com/jeffbmartinez/delay) | Add delays/latency to endpoints. Useful when testing effects of high latency |
| [onthefly](https://github.com/xyproto/onthefly) | Generate TinySVG, HTML and CSS on the fly |

View File

@@ -260,9 +260,9 @@ const (
// See `File` package-level function too.
//
// Examples:
// https://github.com/kataras/iris/tree/master/_examples/logging/request-logger/accesslog
// https://github.com/kataras/iris/tree/master/_examples/logging/request-logger/accesslog-template
// https://github.com/kataras/iris/tree/master/_examples/logging/request-logger/accesslog-broker
// https://github.com/kataras/iris/tree/main/_examples/logging/request-logger/accesslog
// https://github.com/kataras/iris/tree/main/_examples/logging/request-logger/accesslog-template
// https://github.com/kataras/iris/tree/main/_examples/logging/request-logger/accesslog-broker
func New(w io.Writer) *AccessLog {
ac := &AccessLog{
Clock: clockFunc(time.Now),

View File

@@ -63,7 +63,10 @@ func LoadOptions(filename string) (opts Options) {
return
}
// Engine is the rewrite engine master structure.
// Rewrite is a struct that represents a rewrite engine for Iris web framework.
// It contains a slice of redirect rules, an options struct, a logger, and a domain validator function.
// It provides methods to create, configure, and apply rewrite rules to HTTP requests and responses.
//
// Navigate through _examples/routing/rewrite for more.
type Engine struct {
redirects []*redirectMatch