In order to give you better service we use cookies. By continuing to use our website, you agree to the use of cookies as described in our Cookie Policy

  • Products
    Service Control Platform
    Platform Overview Kong Manager Kong Dev Portal Kong Vitals Kong Brain Kong Immunity
    Offerings
    Kong

    The blazingly fast open source microservices API gateway.

    Kong Enterprise

    The next-generation API platform built on top of Kong.

    Kong Cloud

    Kong Enterprise innovation delivered at cloud speed.

  • Solutions
    API Gateway

    Take control of your microservices traffic with the world's most popular API gateway.

    Kubernetes Ingress

    Own your Kubernetes cluster by extending Kong functionality as an ingress controller.

    Service Mesh

    Inject Kong as a sidecar for your services to go from mess to mesh.

  • Open Source
    Install

    Deploy Kong on your environment and platform of choice.


    Kubernetes Ingress

    Own your Kubernetes cluster by extending Kong functionality as an ingress controller.

    GitHub

    Find code or file an issue for Kong’s code/documentation.

    Kong Nation

    Get help from Kong engineers and community members.

    Community

    Join the Kong community to find help or contribute to Kong.


  • Hub
Kong
  • Docs
    Kong Docs + Getting Started

    Use the 5-minute quickstart and installation guide to deploy Kong now.

    Deploy Kong Enterprise

    Use the quickstart and reference materials to launch Kong Enterprise today.

    Master Kong Vitals

    Learn how to implement Vitals and optimize it for your deployment.

    Launch your Dev Portal

    Learn how to create and manage your Kong Dev Portal.

  • Resources
    Connect
    Community Kong Nation GitHub Kong Summit
    Get Support
    Enterprise Support Portal FAQs
    Learn
    Blog Ebooks Webinars Briefs
  • Company
    aboutAbout
    investorsInvestors
    careersCareers
    partnersPartners
    pressPress
    contactContact
  • Request Demo
Request Demo Installation
Products  
  Products
Service Control Platform
Platform Overview Kong Manager Kong Dev Portal Kong Vitals Kong Brain Kong Immunity
Offerings
Kong Kong Enterprise Kong Cloud
Solutions  
  Solutions
API Gateway Kubernetes Ingress Service Mesh
Open Source  
  Open Source
Install GitHub Kong Nation Community
Hub
Docs  
  Docs
Kong Kong Enterprise Kong Vitals Dev Portal
Resources  
  Resources
Connect
Community Kong Nation GitHub Kong Summit
Get Support
Enterprise Support Portal
Learn
Blog Ebooks Webinars Briefs
Company  
  Company
About Investors Careers Partners Press Contact
Edit this Page
Kong Kong Enterprise
Documentation

Kong Dev Portal Networking

  • 0.34-x (latest)
  • 0.33-x
  • 0.32-x
  • 0.31-x
Getting Started
  • Introduction
  • Five-minute quickstart
  • Adding your API
  • Enabling Plugins
  • Adding Consumers
  • Licensing
  • Accessing Your License
Installation
  • Docker
  • CentOS
  • Amazon Linux
APIs and Plugins
  • Canary Release Plugin
  • Rate Limiting Plugin
  • Request Transformer Plugin
  • OAuth2 Introspection Plugin
  • OpenID Connect Plugin
  • HTTP Proxy Caching
  • Forward Proxy
  • StatsD Advanced Plugin
  • LDAP Auth Advanced Plugin
Workspaces
  • Overview
  • Admin API
  • Examples
RBAC
  • Overview
  • Admin API
  • Examples
Kong Admin GUI
  • Overview
  • Configuration
    • Getting Started
    • Authentication
    • Managing Admins
    • Networking
    • Property Reference
Kong Developer Portal
  • Overview
  • Glossary
  • Best Practices
  • Configuration
    • Getting Started
    • Authentication
    • Networking
    • Property Reference
  • Managing Developers
  • Developer Access
  • File Management
  • Customization
  • FAQ
Guides & References
  • Kong Deployment Guide
  • Changelog
  • Architecture Overview
  • Architecture Patterns
  • Kong Vitals
  • Rate Limiting Library
  • Kong Enterprise Edition Versioning
  • Multiple Authentication Methods
  • PostgreSQL on RedHat
  • OpenID Connect with Google
  • OpenID Connect with Auth0
  • Upgrades and Migrations
Careful! You are browsing documentation for an outdated version of Kong. Go here to browse the documentation for the latest version.

Table of Contents

  • Introduction
  • Summary
    • proxy_url
    • portal_gui_url
  • Default Configuration
  • Custom Configuration
    • proxy_url configuration
    • portal_gui_url configuration

Introduction

This document reviews how the proxy_url and portal_gui_url config variables are utilized within the Kong proxy, Dev Portal, and Admin GUI. Below you find a summary of these config variables and their default settings.

Summary

proxy_url

Description:
The Dev Portal will use this information to build the API endpoint for requests to Kong. By default, the Kong Portal will use the window request host and append the resolved listener port depending on the requested protocol.

portal_gui_url

Description:
Sets CORS Access Origin in regards to requests related to the developer portal (set to * by default). Acts as Dev Portal location reference for Kong, the Admin GUI, and the Dev Portal itself. By default, the Kong Portal will use the window request host and append the resolved listener port depending on the requested protocol.

Default Configuration

The Kong Dev Portal works out of the box:

  1. Start Kong without custom configuration:
kong start
  1. Navigate to 127.0.0.1:8003 (default portal_gui_url location). You should see the Default Dev Portal.

  2. Open your developer tools in your browser and click on the network tab.

  3. Refresh the Dev Portal window and inspect the network tab again. Notice that the Kong Portal is making requests to the proxy_url default value: http://127.0.0.1:8000.

Custom Configuration

There are cases in which proxy_url and portal_gui_url need to be set to accommodate your network setup. Below you will find an example for a common use case where the Kong proxy and Dev Portal are served via different URLs.

Consider this domain setup:

  • http://company.com (public facing website)
  • http://proxy.company.com -> (Kong Proxy)
  • http://dev-portal.company.com -> (public Dev Portal)
  • http://admin-gui.company.com -> (internal Admin GUI)

proxy_url configuration

With proxy_url set to it’s default value the Dev Portal will make requests to http://dev-portal.company.com:8000, as proxy_url defaults to window.location when no value is set. As a result the Dev Portal incorrectly requests files from http://dev-portal.company.com rather than http://proxy.company.com, resulting in an error.

Setting proxy_url to http://proxy.company.com in kong.config will allow the Dev Portal to make requests to the correct location.

proxy_url = http://proxy.company.com

Visiting http://dev-portal.company.com will now result in a successful render.

portal_gui_url configuration

portal_gui_url has a value of NONE by default. It will appear as empty and commented out in kong.conf:

#portal_gui_url =

When portal_gui_url is not defined:

  • Kong Proxy will set CORS to *, allowing any origin to make requests to the Dev Portal.
  • Admin GUI and Dev Portal use portal_gui_url to reference Dev Portal location. As a result the Admin GUI will reference window.location by default when linking out to the Dev Portal resulting in a redirect to http://admin-gui.company.com rather than http://dev-portal.company.com.

Setting portal_gui_url to http://dev-portal.company.com will:

  • Give context to Admin GUI and Dev Portal.
  • Update CORS in the Kong Proxy to only accept Dev Portal requests from the portal_gui_url.

Next: Learn more about our Property References ›

  • Kong
    Star
  • Products
    • Kong
    • Kong Enterprise
    • Kong Cloud
    • Subscriptions
  • Resources
    • Enterprise Support
    • Documentation
    • Partners
    • Webinars
    • Ebooks
  • Company
    • About
    • Investors
    • News
    • Careers Hiring!
    • Kong Summit
    • Contact
  • Open Source
    • Install
    • GitHub
    • Kong Nation
    • Community
  • © Kong Inc. 2019   Terms•Privacy