Created
September 27, 2020 14:19
-
-
Save johnhpatton/bd72123169d8685f075925f55cdd4428 to your computer and use it in GitHub Desktop.
product_number nginx map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get product_number from the product availability URI: | |
# /api/product/check_availability/{product_number} | |
# where | |
# product_number begins with an alpha character and ends with 7 digits. | |
map $request_uri $product_number { | |
"~^/api/product/check_availability/(?<re_match>[a-zA-Z]\d{7})$" $re_match; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment