The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio 🚀
Go to file
TangDandan 3d8e6a0317 Modify core/router/api_builder.go
When I use file-server like this
```
v1 := app.Party("/aa/bb")
v1.HandleDir(/static, "./assets", iris.DirOptions{
  IndexName: "/index.html",
  Gzip: false,
  ShowList: false,
})
```
and I request `http://localhost:8080/aa/bb/static` or `http://localhost:8080/aa/bb/cc/static/index.html`,
it will be 404 NOT FOUND.
Because the modified line will create a route `/aa/bb/aa/bb/static` which expected `/aa/bb/static`

Thanks for your consideration.


Former-commit-id: cb680a5f8c103e8c14986e1b64505f7faff6326d
2019-11-13 15:55:47 +08:00
_benchmarks obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
_examples minor 2019-11-03 00:41:52 +02:00
.github let's see if travis accepts go 1.13 with the current import path. 2019-10-05 22:33:43 +03:00
cache obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
context obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
core Modify core/router/api_builder.go 2019-11-13 15:55:47 +08:00
hero obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
httptest obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
macro obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
middleware obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
mvc obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
sessions obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
typescript obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
versioning obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
view obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
websocket obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
.fossa.yml Add the new websocket package (which is just a helper for kataras/neffos) and an example for go server, client, browser client and nodejs client. Add a .fossa.yml and the generated NOTICE file for 3rd-party libs. Update go.mod, go.sum. Update the vendor folder for pongo2 to its latest master as well 2019-06-02 17:49:45 +03:00
.gitattributes minor 2019-07-19 12:27:35 +03:00
.gitignore nothing serious here yet, just having fun with powershell and my nerves - but it works 2019-06-24 04:49:24 +03:00
.travis.yml travis: go_import_path with version suffix 2019-10-26 19:00:22 +03:00
AUTHORS Update to version 8.5.5 | Read HISTORY.md 2017-11-02 05:54:33 +02:00
CODE_OF_CONDUCT.md Update to version 8.5.5 | Read HISTORY.md 2017-11-02 05:54:33 +02:00
configuration_test.go formatting 2019-08-17 10:06:20 +03:00
configuration.go obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
CONTRIBUTING.md extract the Delim for redis sessiondb as requested at https://github.com/kataras/iris/issues/1256 and add a mvc/regexp example and some other trivial changes 2019-05-30 10:48:07 +03:00
doc.go add a note on http-errors example about #1389 2019-10-31 06:37:35 +02:00
FAQ.md minor 2019-10-26 18:55:54 +03:00
go.mod add HISTORY entry for v12 2019-10-26 18:40:35 +03:00
go.sum add HISTORY entry for v12 2019-10-26 18:40:35 +03:00
go19.go obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
HISTORY_ES.md Spanish translations updated 2019-10-29 17:28:44 -06:00
HISTORY.md add HISTORY entry for v12 2019-10-26 18:40:35 +03:00
iris.go minor README changes 2019-11-05 22:12:26 +02:00
LICENSE some cleanup, and remove the test 'testwebocket2' package at all; A lower-level fast websocket impl based on gobwas/ws will be published on a different repo, it is a WIP 2019-02-22 21:24:10 +02:00
NOTICE fossa 2019-07-22 11:40:17 +03:00
README_ES.md Spanish translations updated | merge pull request #1387 from 1hitOVER/master 2019-10-30 18:57:51 +02:00
README_FA.md add follow button under the book 2019-10-30 13:57:27 +02:00
README_GR.md add follow button under the book 2019-10-30 13:57:27 +02:00
README_KO.md add follow button under the book 2019-10-30 13:57:27 +02:00
README_ZH.md add follow button under the book 2019-10-30 13:57:27 +02:00
README.md minor 2019-11-09 00:52:49 +02:00
VERSION README: add gif 2019-11-08 15:01:37 +02:00

Iris Web Framework

build status report card view examples chat donate on PayPal

Iris is a fast, simple yet fully featured and very efficient web framework for Go. It provides a beautifully expressive and easy to use foundation for your next website or API.

Learn what others say about Iris and star this github repository.

Iris version 12 released. Read more here.

Learning Iris

Quick start
# assume the following code in example.go file
$ cat example.go
package main

import "github.com/kataras/iris/v12"

func main() {
    app := iris.Default()
    app.Get("/ping", func(ctx iris.Context) {
        ctx.JSON(iris.Map{
            "message": "pong",
        })
    })

    app.Run(iris.Addr(":8080"))
}
# run example.go and
# visit http://localhost:8080/ping on browser
$ go run example.go

Routing is powered by muxie, the most powerful and fastest trie-based software written in Go.

Iris contains extensive and thorough wiki making it easy to get started with the framework.

For a more detailed technical documentation you can head over to our godocs. And for executable code you can always visit the _examples repository's subdirectory.

Do you like to read while traveling?

Book cover

You can request a PDF version and online access of the E-Book today and be participated in the development of Iris.

Contributing

We'd love to see your contribution to the Iris Web Framework! For more information about contributing to the Iris project please check the CONTRIBUTING.md file.

List of all Contributors

Security Vulnerabilities

If you discover a security vulnerability within Iris, please send an e-mail to iris-go@outlook.com. All security vulnerabilities will be promptly addressed.

License

The project name "Iris" was inspired by the Greek mythology.

Iris Web Framework is free and open-source software licensed under the 3-Clause BSD License.