Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
王博
kong-plugin
Commits
8de12574
Commit
8de12574
authored
5 years ago
by
王博
Browse files
Options
Download
Email Patches
Plain Diff
init
parent
cfd90d0a
master
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
.gitignore
.idea/vcs.xml
+6
-0
.idea/vcs.xml
kong/plugins/myplugin/handler.lua
+3
-2
kong/plugins/myplugin/handler.lua
with
10 additions
and
2 deletions
+10
-2
.gitignore
0 → 100644
View file @
8de12574
.idea/*
This diff is collapsed.
Click to expand it.
.idea/vcs.xml
0 → 100644
View file @
8de12574
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
kong/plugins/myplugin/handler.lua
View file @
8de12574
...
...
@@ -62,7 +62,8 @@ function plugin:access(plugin_conf)
plugin
.
super
.
access
(
self
)
-- your custom code here
ngx
.
req
.
set_header
(
"Hello-World"
,
"this is on a request"
)
ngx
.
req
.
set_header
(
"HTTP_X_REAL_PORT"
,
ngx
.
var
.
remote_addr
)
end
--]]
...
...
@@ -71,7 +72,7 @@ function plugin:header_filter(plugin_conf)
plugin
.
super
.
header_filter
(
self
)
-- your custom code here, for example;
ngx
.
header
[
"Bye-World"
]
=
"this is on the response"
--
ngx.header["Bye-World"] = "this is on the response"
end
--]]
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help