Skip to content

Commit

Permalink
Service name changed
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamgutgutia committed Dec 17, 2023
1 parent a3c448b commit b99b4c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:

- name: Deploy to Cloud Run
run: |
gcloud run deploy contacts-generator-backend-continuous \
gcloud run deploy contactify-backend \
--image shivamgutgutia/contactify:latest \
--region asia-south1 \
--project=shivam-contacts-generator \
&& gcloud run services update-traffic contacts-generator-backend-continuous --to-latest --region=asia-south1\
&& gcloud run services update-traffic contactify-backend --to-latest --region=asia-south1\
--platform managed
12 changes: 11 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
from flask import Flask, jsonify
from flask import Flask, jsonify, request
from flask_cors import CORS
from dotenv import load_dotenv
import os
from routers import router
import traceback
load_dotenv()


app= Flask(__name__)
#CORS(app)
CORS(app, resources={r"/*": {"origins": "https://contactify.codechefvit.com", "methods": ["GET", "POST"]}})
app.config['MAX_CONTENT_LENGTH'] = 1024*1024*1024

# def check_origin():
# if "Origin" not in request.headers or request.headers["Origin"] != "https://contactify.codechefvit.com":
# return False
# return True

# @app.before_request
# def before_request():
# # Check if the request origin is allowed
# if request.method != 'OPTIONS' and not check_origin():
# return jsonify({"error": "Forbidden"}), 403

app.register_blueprint(router)

Expand Down

0 comments on commit b99b4c7

Please sign in to comment.