Browse Source

minor

Former-commit-id: de1a500475
tags/v12.1.5
Gerasimos (Makis) Maropoulos 1 year ago
parent
commit
79a965ec2d
4 changed files with 10 additions and 5 deletions
  1. +1
    -0
      .gitattributes
  2. +3
    -3
      README.md
  3. +1
    -1
      _examples/tutorial/vuejs-todo-mvc/README.md
  4. +5
    -1
      core/netutil/addr.go

+ 1
- 0
.gitattributes View File

@@ -1,6 +1,7 @@
*.go linguist-language=Go
_examples/* linguist-documentation
_benchmarks/* linguist-documentation
go.sum linguist-generated
# Set the default behavior, in case people don't have core.autocrlf set.
# if from windows:
# git config --global core.autocrlf true


+ 3
- 3
README.md View File

@@ -1,10 +1,8 @@
# Happy New Year!

It's my **birthday today** and I wish good luck and well health to all and especially to those who are being tested!

![](https://iris-go.com/images/release.png) Iris version **12.1.4** has been [released](HISTORY.md#su-29-december-2019--v1214)!

![](https://iris-go.com/images/cli.png) The official Iris Command Line Interface will soon be near you in 2020!
![](https://iris-go.com/images/cli.png) The official [Iris Command Line Interface](https://github.com/kataras/iris-cli) will soon be near you in 2020!

![](https://iris-go.com/images/sponsor.png) Support your favorite web framework through [Github Sponsors Program](https://github.com/sponsors/kataras)!

@@ -24,6 +22,8 @@ Learn what [others saying about Iris](https://iris-go.com/testimonials/) and **[
<summary>Quick start</summary>

```sh
# https://github.com/kataras/iris/wiki/Installation
$ go get github.com/kataras/iris/v12@latest
# assume the following code in example.go file
$ cat example.go
```


+ 1
- 1
_examples/tutorial/vuejs-todo-mvc/README.md View File

@@ -556,7 +556,7 @@ Run the Iris web server you've just created by executing `go run main.go` from y

```sh
$ go run main.go
Now listening on: http://0.0.0.0:8080
Now listening on: http://localhost:8080
Application Started. Press CTRL+C to shut down.
_
```


+ 5
- 1
core/netutil/addr.go View File

@@ -157,7 +157,7 @@ func ResolveVHost(addr string) string {

if idx := strings.IndexByte(addr, ':'); idx == 0 {
// only port, then return the 0.0.0.0
return "0.0.0.0" + addr[idx:]
return /* "0.0.0.0" */ "localhost" + addr[idx:]
}

// with ':' in order to not replace the ipv6 loopback addresses
@@ -215,5 +215,9 @@ func ResolveSchemeFromVHost(vhost string) string {
// and returns its URL, pure implementation but it does the job.
func ResolveURL(scheme string, addr string) string {
host := ResolveVHost(addr)
if host == "0.0.0.0" {
host = "localhost"
}

return scheme + "://" + host
}

Loading…
Cancel
Save