Skip to content

Commit

Permalink
Associated Flask endpoints with their own dedicated Azure Function
Browse files Browse the repository at this point in the history
  • Loading branch information
hvalfangst committed Jan 14, 2024
1 parent 759b57a commit 8ad1709
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python version
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions function_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import azure.functions as func
from flask import Flask, jsonify, request

from crypto_utils import aes_encrypt, aes_decrypt

app = Flask(__name__)
Expand Down Expand Up @@ -89,4 +88,5 @@ def decrypt():
return jsonify(response)


app = func.WsgiFunctionApp(app=app.wsgi_app, http_auth_level=func.AuthLevel.ANONYMOUS)
# Create an Azure Function which serves the above routes in our WSGI runtime (Gunicorn)
app = func.WsgiFunctionApp(app=app.wsgi_app, http_auth_level=func.AuthLevel.ANONYMOUS)
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"plain_text\": \"TVT is a copium addict\",\r\n \"encryption_key\": \"naturligvis\"\r\n}",
"raw": "{\r\n \"plain_text\": \"Goofy on Acid\",\r\n \"encryption_key\": \"ballyr\"\r\n}",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -62,7 +62,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"encrypted_text\": \"ptmFnxDwlDwifg/L9Td5d9Hce12kevZ/Sm7OlP4iNZk=:EWxKvcaCVHgKLs34wgzWVg==:8lvYK2fkOLrOdEXNyOXNp+DQ3rb8duyh1RNMReNqVPU=\",\r\n \"encryption_key\": \"naturligvis\"\r\n}",
"raw": "{\r\n \"encrypted_text\": \"f=\",\r\n \"encryption_key\": \"ballyr\"\r\n}",
"options": {
"raw": {
"language": "json"
Expand Down

0 comments on commit 8ad1709

Please sign in to comment.