Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
imogenkraak committed Oct 15, 2024
1 parent c80405a commit 0bd888f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ stop: ## Stop runs development environment with mserv and mongo in docker compos

# Builds multiple Go plugins and moves them into local Tyk instance.
plugins:
> @for plugin in plugin.go plugin-2.go; do \
> @for plugin in plugin_1.go plugin_2.go; do \
> docker compose run --rm tyk-plugin-compiler $$plugin _$$(date +%s); \
> done
.PHONY: plugins
Expand Down
10 changes: 5 additions & 5 deletions bundles/simple/manifest.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"file_list": [
"plugin_v5.2.2_linux_amd64.so",
"plugin-2_v5.2.2_linux_amd64.so"
"plugin_1_v5.2.2_linux_amd64.so",
"plugin_2_v5.2.2_linux_amd64.so"
],
"custom_middleware": {
"pre": [
{
"name": "AddFooBarHeader",
"path": "plugin_v5.2.2_linux_amd64.so",
"path": "plugin_1_v5.2.2_linux_amd64.so",
"require_session": false,
"raw_body_only": false
},
{
"name": "AddFooBarHeader2",
"path": "plugin-2_v5.2.2_linux_amd64.so",
"name": "AddHelloWorldHeader",
"path": "plugin_2_v5.2.2_linux_amd64.so",
"require_session": false,
"raw_body_only": false
}
Expand Down
10 changes: 0 additions & 10 deletions bundles/simple/plugin-2.go

This file was deleted.

File renamed without changes.
10 changes: 10 additions & 0 deletions bundles/simple/plugin_2.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package main

import (
"net/http"
)

// AddHelloWorldHeader adds custom "Hello: World" header to the request
func AddHelloWorldHeader(_ http.ResponseWriter, r *http.Request) {
r.Header.Add("Hello", "World")
}

0 comments on commit 0bd888f

Please sign in to comment.