diff --git a/client/package.json b/client/package.json index 8c13d7e..93e97d7 100644 --- a/client/package.json +++ b/client/package.json @@ -16,7 +16,7 @@ }, "scripts": { "start": "react-scripts start", - "build": "react-scripts build", + "build": "GENERATE_SOURCEMAP=false react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, diff --git a/hvalfangst_function/function_app.py b/hvalfangst_function/function_app.py index af2ce89..5817a3d 100644 --- a/hvalfangst_function/function_app.py +++ b/hvalfangst_function/function_app.py @@ -74,10 +74,12 @@ def validate_jwt(token: str, audience: str) -> bool: @app.route(route="upload_csv", auth_level=func.AuthLevel.ANONYMOUS) -@app.blob_output(arg_name="outbound", path="hvalfangstcontainer/in/input.csv", connection="AzureWebJobsStorage") +@app.blob_output(arg_name="outbound", path="hvalfangstcontainer/in/input.csv", connection="") def upload_csv(req: func.HttpRequest, outbound: func.Out[str]) -> str: try: + logging.info("Received HTTP request to upload CSV") + # Validate JWT token token = req.headers.get("Authorization").split(" ")[1] # Extract Bearer token if not validate_jwt(token, audience=os.environ.get("FUNCTION_APP_CLIENT_ID")): return func.HttpResponse("Unauthorized", status_code=401)