A simple kong plugin that 301 redirect http request to https version, for example:
if your user visit your site with http:
http://www.example.com/xxx.php?a=b
this plugin will redirect to:
https://www.example.com/xxx.php?a=b
-
clone the code:
git clone [email protected]:pocketdigi/kong-plugin-http301https.git
-
install
cd kong-plugin-http301https luarocks make
-
Edit /etc/kong/kong.conf, uncomment
plugins = bundled
add http301httpsplugins = bundled,http301https
-
Restart kong
-
Add plugin to your service