fastapi-basic 0.0.8__py3-none-any.whl → 0.0.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fastapi-basic might be problematic. Click here for more details.

@@ -3,6 +3,7 @@ from functools import lru_cache
3
3
  import os, dotenv
4
4
 
5
5
  from fastapi import FastAPI, Request
6
+ from fastapi.middleware.cors import CORSMiddleware
6
7
  from starlette.concurrency import iterate_in_threadpool
7
8
  import logging
8
9
 
@@ -43,6 +44,13 @@ class BaseFactory(metaclass=ABCMeta):
43
44
  app = FastAPI(docs_url=app_config.get('DOCS_URL'), redoc_url=app_config.get('REDOC_URL'), openapi_url=app_config.get('OPENAPI_URL'))
44
45
  app.state.config = app_config
45
46
 
47
+ app.add_middleware(
48
+ CORSMiddleware,
49
+ allow_origins=['*'],
50
+ allow_credentials=True,
51
+ allow_methods=['*'],
52
+ allow_headers=['*'],
53
+ )
46
54
  self.__setup_main_logger(app, logger_name=app.state.config.get('LOGGER_NAME', LOG_DEFAULT_LOGGER_NAME), level=logging.DEBUG)
47
55
 
48
56
  @app.middleware("http")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi_basic
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: A short description of your module
5
5
  Home-page: https://github.com/szx21023/fastapi-base
6
6
  Author: szx21023
@@ -1,9 +1,9 @@
1
1
  fastapi_basic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  fastapi_basic/base_config.py,sha256=_AMa1BDpCw0e00BUYKzOGVBjHrbAR5WfIWwlRS_Dmug,273
3
- fastapi_basic/base_factory.py,sha256=3SFewCi2SKpvAZp5kjpGYz_hTxqS_WJa0ecEBicq9mc,2332
3
+ fastapi_basic/base_factory.py,sha256=nBBLX2ymqLoKTHnJTl9pw9JsJiB6LX4auhLSvU3x_bw,2584
4
4
  fastapi_basic/const.py,sha256=UA7-Eefu_dbWpbFn09Ei_BPb903SExnCgVbnm8_3ALE,99
5
5
  fastapi_basic/utils.py,sha256=8ympyQIXsKkxLILTI_7ug85vmKWYKqX0mpADjgHekgU,306
6
- fastapi_basic-0.0.8.dist-info/METADATA,sha256=w9LeU9tlfQRfa2whpukhvTotXOZDDdtxC4A1r8nuxi4,1508
7
- fastapi_basic-0.0.8.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
- fastapi_basic-0.0.8.dist-info/top_level.txt,sha256=Q9PdwWxaB4dy135MQHiroRYOqArdUSaIeEkzYinN6W0,14
9
- fastapi_basic-0.0.8.dist-info/RECORD,,
6
+ fastapi_basic-0.0.9.dist-info/METADATA,sha256=3iluGrKgnnrC3p6HMuXZGaxm3ZrB8lGgCWc8EGwrr2s,1508
7
+ fastapi_basic-0.0.9.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
+ fastapi_basic-0.0.9.dist-info/top_level.txt,sha256=Q9PdwWxaB4dy135MQHiroRYOqArdUSaIeEkzYinN6W0,14
9
+ fastapi_basic-0.0.9.dist-info/RECORD,,