Configure Azure Function Proxies

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

In this hands-on lab, we will configure an Azure Function proxy.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Log In to the Azure Portal

Log in to the Azure Portal using the username and password supplied by the lab.

  1. Open a browser.
  2. Navigate to the provided Azure Portal URL.
  3. Use the supplied username and password to authenticate.
Create the HTTP-Triggered Function

Starting in the Azure dashboard, perform the following tasks:

  1. Open the navigation menu in the upper-left of the Portal.
  2. Click All resources

Wait for all the resources to appear.

In the list, click the app service that has a name starting with fa-. This will open the overview page of the function app service.

On the function app overview page, click Functions in the function apps navigation tree on the left of the page.

Click + New function at the top of the empty list of functions.

In the list of triggers, click on HTTP trigger.

Name the function "HttpTrigger1".

Click Create.

Wait for the function code to open in the browser.

Create the Function Proxy

On the code page for the HTTP-triggered function, click Get function URL near the top of the page. On the popup, click Copy to copy the URL to the clipboard. Close the popup.

In the Function apps navigation tree, click Proxies.

When the empty list of proxies displays, click + New proxy. In the configuration form, enter the following information:

  • Name: proxy
  • Route template: /myfunc

In the Backend URL field, paste in the function URL copied earlier.

Click Create.

Run the Function via the Proxy

After the Create function task returns, the field Proxy URL will contain a URL. Click Copy to copy the URL to the clipboard.

Open a new browser tab. Paste the URL into the address bar and press enter.

The browser will display the following:

Please pass a name on the query string or in the request body

The function has been run via the proxy, but we need to add the name parameter to the URL, so add ?name=Me to the URL and press enter.

The browser will then display the following:

Hello, Me

Additional Resources

You want to provide an alternate URL to your HTTP-triggered Azure Function. You decide that you want to do this with an Azure Function proxy. You need to create that proxy and ensure that the function runs when the proxy is called.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?