Skip to content

Commit

Permalink
Add all headers & param (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Oct 8, 2020
1 parent bd55394 commit 8f0de02
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.15.2

ARG RHINO_VERSION=1.2.1
ARG RHINO_VERSION=1.2.2

ENV GO111MODULE=on

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<p align="center">
<img alt="Rhino Logo" src="https://raw.githubusercontent.com/clivern/Rhino/master/assets/img/gopher.png?v=1.2.1" width="150" />
<img alt="Rhino Logo" src="https://raw.githubusercontent.com/clivern/Rhino/master/assets/img/gopher.png?v=1.2.2" width="150" />
<h3 align="center">Rhino</h3>
<p align="center">HTTP Mocking & Debugging Service</p>
<p align="center">
<a href="https://travis-ci.com/Clivern/Rhino"><img src="https://travis-ci.com/Clivern/Rhino.svg?branch=master"></a>
<a href="https://github.com/Clivern/Rhino/releases"><img src="https://img.shields.io/badge/Version-1.2.1-red.svg"></a>
<a href="https://goreportcard.com/report/github.com/Clivern/Rhino"><img src="https://goreportcard.com/badge/github.com/clivern/Rhino?v=1.2.1"></a>
<a href="https://github.com/Clivern/Rhino/releases"><img src="https://img.shields.io/badge/Version-1.2.2-red.svg"></a>
<a href="https://goreportcard.com/report/github.com/Clivern/Rhino"><img src="https://goreportcard.com/badge/github.com/clivern/Rhino?v=1.2.2"></a>
<a href="https://hub.docker.com/r/clivern/rhino"><img src="https://img.shields.io/badge/Docker-Latest-green"></a>
<a href="https://github.com/Clivern/Rhino/blob/master/LICENSE"><img src="https://img.shields.io/badge/LICENSE-MIT-orange.svg"></a>
</p>
Expand Down
4 changes: 2 additions & 2 deletions core/controller/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func Debug(c *gin.Context) {
headers := make(map[string]string)

for k, v := range c.Request.URL.Query() {
parameters[k] = v[0]
parameters[k] = strings.Join(v, ", ")
}

for k, v := range c.Request.Header {
headers[k] = v[0]
headers[k] = strings.Join(v, ", ")
}

route := model.GetRoute(c.FullPath(), "", parameters)
Expand Down
4 changes: 2 additions & 2 deletions core/controller/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ func Mock(c *gin.Context) {
headers := make(map[string]string)

for k, v := range c.Request.URL.Query() {
parameters[k] = v[0]
parameters[k] = strings.Join(v, ", ")
}

for k, v := range c.Request.Header {
headers[k] = v[0]
headers[k] = strings.Join(v, ", ")
}

route := model.GetRoute(c.FullPath(), c.Request.Method, parameters)
Expand Down
2 changes: 1 addition & 1 deletion deployment/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
rhino:
image: 'clivern/rhino:release-1.2.1'
image: 'clivern/rhino:release-1.2.2'
ports:
- "8080:8080"
command: '/app/rhino serve -c /app/configs/config.prod.json'
Expand Down

0 comments on commit 8f0de02

Please sign in to comment.