Add the plugin to the Kong configuration file (kong.conf or kong.yml) under the custom_plugins property:
makefileCopy code
custom_plugins: - etta-uri-changer
Step 6: Test the Plugin
Start Kong Gateway and ensure it's running.
Send a request through Kong Gateway, and the plugin will modify the URI to "etta.uri.test".
Note: Make sure to restart Kong Gateway or reload the configuration for the changes to take effect.
That's it! You have created a custom Kong plugin that changes the URI to "etta.uri.test". You can further enhance the plugin by adding validation, error handling, or other functionalities as per your requirements.
SET UP ENVIRONMENT
Launch Script
Run this command in the terminal to set up your environment (~30 seconds).
./launch-dev-portal_summit.sh
Script Description
The launch script configures your environment with the following:
Creates a Docker Network called kong-net
Installs and starts the database
Prepares your database (Kong migration)
Installs and starts Kong with environment variables and configurations
Verify Setup
This learning lab utilizes the Kong Enterprise command line.
Verify that your environment is up and running.
Response
The results should be a HTTP/1.1 200 OK response from Kong.
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (