File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 33"""
44
55from dynaconf import FlaskDynaconf
6- from flask import Flask , request , jsonify
6+ from flask import Flask
77from flask_cors import CORS
88
99
@@ -36,17 +36,6 @@ def create_app(**config):
3636 supports_credentials = True ,
3737 )
3838
39- # 🔹 Intercepta e responde a requisições OPTIONS antes que o navegador bloqueie
40- @app .before_request
41- def handle_preflight ():
42- if request .method == "OPTIONS" :
43- return "" , 200
44-
45- # 🔹 Exemplo de rota para testar o CORS
46- @app .route ("/api/v1/leads" , methods = ["GET" ])
47- def get_leads ():
48- return jsonify ({"message" : "Sucesso!" })
49-
5039 print (f"Ambiente atual: { app .config .env } " ) # type: ignore
5140 print (f"Banco de dados atual: { app .config .get ('SQLALCHEMY_DATABASE_URI' )} " )
5241 print ("Aplicação inicializada com sucesso!" )
You can’t perform that action at this time.
0 commit comments