roshcheeku commited on
Commit
3e44fe1
·
verified ·
1 Parent(s): 687789c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -16
app.py CHANGED
@@ -39,22 +39,10 @@ BASE_DIR = os.getcwd()
39
  # Flask app initialization
40
  app = Flask(__name__)
41
 
42
- # Enable CORS
43
- CORS(app, resources={
44
- r"/*": {
45
- "origins": [
46
- "http://localhost:3000",
47
- "https://carelog-diabetes-api.onrender.com",
48
- "https://carelog-diabetes.vercel.app",
49
- "http://localhost:5000"
50
- ],
51
- "methods": ["GET", "POST", "OPTIONS"],
52
- "allow_headers": ["Content-Type", "Authorization"],
53
- "supports_credentials": True
54
- }
55
- })
56
-
57
- # Root route for Hugging Face Space
58
  @app.route('/')
59
  def index():
60
  return """
 
39
  # Flask app initialization
40
  app = Flask(__name__)
41
 
42
+ # Enable CORS for all origins
43
+ CORS(app, supports_credentials=True)
44
+
45
+ # Root route
 
 
 
 
 
 
 
 
 
 
 
 
46
  @app.route('/')
47
  def index():
48
  return """