Merge pull request #315 from Autonomy-Logic/master

Add version info on https API
This commit is contained in:
Thiago Alves
2025-12-17 18:02:42 -05:00
committed by GitHub
+9
View File
@@ -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)