Skip to content

Commit

Permalink
Merge branch 'main' into lisa/fix-workflow-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lsmith500 authored May 27, 2021
2 parents ac86bdd + a6e7f6e commit 36c0c04
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: sigsci-module-golang
on:
push:
branches:
- master
- main
pull_request:


Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# GoLang Module Release Notes

## 1.10.0 2021-05-26

* Added support for `application/graphql` content-type

## 1.9.0 2020-10-22

* Added `server_flavor` config option.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Effective **May 17th 2021** the default branch will change from `master` to `mai
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -
git remote set-head origin -a
```

## Installation
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.0
1.10.0
4 changes: 4 additions & 0 deletions module.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@ func inspectableContentType(s string) bool {
// gRPC (protobuf)
case strings.HasPrefix(s, "application/grpc"):
return true

// GraphQL
case strings.HasPrefix(s, "application/graphql"):
return true
}

return false
Expand Down
2 changes: 2 additions & 0 deletions module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ func TestInspectableContentType(t *testing.T) {
{true, "text/x-javascript"},
{true, "text/x-json"},
{true, "application/javascript"},
{true, "application/graphql"},
{false, "octet/stream"},
{false, "junk/yard"},
}
Expand Down Expand Up @@ -328,6 +329,7 @@ func TestModule(t *testing.T) {
{genTestRequest("POST", "http://example.com/", "application/rss+xml", `<a>1</a>`), 403, "XSS"},
{genTestRequest("POST", "http://example.com/", "application/rss+xml", `<a>1</a>`), 500, "XSS"},
{genTestRequest("POST", "http://example.com/", "application/rss+xml", `<a>1</a>`), 200, ""},
{genTestRequest("POST", "http://example.com/", "application/graphql", `{}`), 200, ""},
}

for pos, tt := range cases {
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package sigsci

const version = "1.9.0"
const version = "1.10.0"

0 comments on commit 36c0c04

Please sign in to comment.