Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add all headers & param #30

Merged
merged 1 commit into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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