mirror of
https://github.com/thiagoralves/OpenPLC_v3.git
synced 2026-09-23 11:34:22 +08:00
Merge pull request #315 from Autonomy-Logic/master
Add version info on https API
This commit is contained in:
@@ -28,6 +28,15 @@ logging.basicConfig(
|
||||
restapi_bp = Blueprint('restapi_blueprint', __name__)
|
||||
_handler_callback_get: Optional[Callable[[str, dict], dict]] = None
|
||||
_handler_callback_post: Optional[Callable[[str, dict], dict]] = None
|
||||
|
||||
|
||||
@restapi_bp.after_request
|
||||
def add_runtime_version_header(response):
|
||||
"""Add runtime version header to all API responses for version detection."""
|
||||
response.headers['X-OpenPLC-Runtime-Version'] = 'v3'
|
||||
return response
|
||||
|
||||
|
||||
jwt = JWTManager(app_restapi)
|
||||
db = SQLAlchemy(app_restapi)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user