jaaql-middleware-python 4.21.34__tar.gz → 4.21.36__tar.gz
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.
- {jaaql-middleware-python-4.21.34/jaaql_middleware_python.egg-info → jaaql-middleware-python-4.21.36}/PKG-INFO +1 -1
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/constants.py +1 -1
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/documentation/documentation_internal.py +9 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/controller.py +4 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/model.py +43 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36/jaaql_middleware_python.egg-info}/PKG-INFO +1 -1
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/LICENSE.txt +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/README.md +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/config/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/config/config-docker.ini +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/config/config-test.ini +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/config/config.ini +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/config_constants.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/db/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/db/db_interface.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/db/db_pg_interface.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/db/db_utils.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/db/db_utils_no_circ.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/documentation/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/documentation/documentation_public.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/documentation/documentation_shared.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/email/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/email/email_manager.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/email/email_manager_service.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/email/patch_ems.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/exceptions/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/exceptions/custom_http_status.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/exceptions/http_status_exception.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/exceptions/not_yet_implement_exception.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/interpreter/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/interpreter/interpret_jaaql.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/jaaql.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/migrations/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/migrations/migration_history.sql +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/migrations/migrations.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/base_controller.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/base_model.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/controller_interface.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/exception_queries.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/generated_queries.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/handmade_queries.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/model_interface.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/response.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/openapi/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/openapi/swagger_documentation.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/patch.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/scripts/01.install_domains.generated.sql +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/scripts/02.install_super_user.exceptions.sql +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/scripts/03.install_super_user.handwritten.sql +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/scripts/04.install_jaaql_data_structures.generated.sql +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/scripts/05.install_jaaql.exceptions.sql +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/scripts/06.install_jaaql.handwritten.sql +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/scripts/swagger_template.html +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/services/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/services/cached_canned_query_service.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/services/migrations_manager_service.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/services/patch_mms.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/services/patch_shared_var_service.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/services/shared_var_service.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/__init__.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/crypt_utils.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/options.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/utils.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/utils_no_project_imports.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/vault.py +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql_middleware_python.egg-info/SOURCES.txt +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql_middleware_python.egg-info/dependency_links.txt +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql_middleware_python.egg-info/requires.txt +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql_middleware_python.egg-info/top_level.txt +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/setup.cfg +0 -0
- {jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: jaaql-middleware-python
|
|
3
|
-
Version: 4.21.
|
|
3
|
+
Version: 4.21.36
|
|
4
4
|
Summary: The jaaql package, allowing for rapid development and deployment of RESTful HTTP applications
|
|
5
5
|
Home-page: https://github.com/JAAQL/JAAQL-middleware-python
|
|
6
6
|
Author: Software Quality Measurement and Improvement bv
|
|
@@ -206,3 +206,12 @@ DOCUMENTATION__prepare = SwaggerDocumentation(
|
|
|
206
206
|
response=RES__allow_all
|
|
207
207
|
)
|
|
208
208
|
)
|
|
209
|
+
|
|
210
|
+
DOCUMENTATION__set_page_headers = SwaggerDocumentation(
|
|
211
|
+
tags="Headers",
|
|
212
|
+
methods=SwaggerMethod(
|
|
213
|
+
name="Sets page headers",
|
|
214
|
+
description="Updates the nginx configuration to include some different headers",
|
|
215
|
+
method=REST__POST
|
|
216
|
+
)
|
|
217
|
+
)
|
|
@@ -109,3 +109,7 @@ class JAAQLController(BaseJAAQLController):
|
|
|
109
109
|
return self.model.check_security_event_key_and_security_event_is_unlocked(http_inputs)
|
|
110
110
|
else:
|
|
111
111
|
return self.model.finish_security_event(http_inputs)
|
|
112
|
+
|
|
113
|
+
@self.publish_route('/internal/set-page-headers', DOCUMENTATION__set_page_headers)
|
|
114
|
+
def set_page_headers(connection: DBInterface):
|
|
115
|
+
self.model.set_page_headers(connection)
|
|
@@ -328,6 +328,49 @@ WHERE
|
|
|
328
328
|
return requests.post("http://127.0.0.1:" + str(PORT__shared_var_service) + ENDPOINT__get_shared_var,
|
|
329
329
|
json={ARG__variable: SHARED_VAR__frozen}).json()[ARG__value]
|
|
330
330
|
|
|
331
|
+
def set_page_headers(self, connection: DBInterface):
|
|
332
|
+
self.is_super_admin(connection)
|
|
333
|
+
|
|
334
|
+
if self.is_container:
|
|
335
|
+
# Define the path to your file
|
|
336
|
+
file_path = '/etc/nginx/sites-available/jaaql'
|
|
337
|
+
|
|
338
|
+
config_path = "nginx.config"
|
|
339
|
+
if not os.path.exists(config_path):
|
|
340
|
+
config_path = "www/" + config_path
|
|
341
|
+
if not os.path.exists(config_path):
|
|
342
|
+
print("Could not find config file")
|
|
343
|
+
return
|
|
344
|
+
|
|
345
|
+
# Read the file content
|
|
346
|
+
with open(file_path, 'r') as file:
|
|
347
|
+
lines = file.readlines()
|
|
348
|
+
|
|
349
|
+
# Initialize variables to track the current state and to store updated lines
|
|
350
|
+
in_section = False
|
|
351
|
+
updated_lines = []
|
|
352
|
+
|
|
353
|
+
for line in lines:
|
|
354
|
+
if line.strip().startswith('add_header "Content-Security-Policy"'):
|
|
355
|
+
in_section = True
|
|
356
|
+
updated_lines.append(line)
|
|
357
|
+
continue # Skip to the next iteration
|
|
358
|
+
elif line.strip().startswith('root /') and in_section:
|
|
359
|
+
# Append new data before the end marker when in a section
|
|
360
|
+
updated_lines.append(new_data)
|
|
361
|
+
in_section = False
|
|
362
|
+
|
|
363
|
+
if not in_section or line.strip().startswith('root /'):
|
|
364
|
+
updated_lines.append(line)
|
|
365
|
+
|
|
366
|
+
# Write the updated content back to the file
|
|
367
|
+
with open(file_path, 'w') as file:
|
|
368
|
+
file.writelines(updated_lines)
|
|
369
|
+
|
|
370
|
+
subprocess.call(['nginx', '-s', 'reload'])
|
|
371
|
+
else:
|
|
372
|
+
print("No headers set for local debugging server")
|
|
373
|
+
|
|
331
374
|
def clean(self, connection: DBInterface):
|
|
332
375
|
self.is_super_admin(connection)
|
|
333
376
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: jaaql-middleware-python
|
|
3
|
-
Version: 4.21.
|
|
3
|
+
Version: 4.21.36
|
|
4
4
|
Summary: The jaaql package, allowing for rapid development and deployment of RESTful HTTP applications
|
|
5
5
|
Home-page: https://github.com/JAAQL/JAAQL-middleware-python
|
|
6
6
|
Author: Software Quality Measurement and Improvement bv
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/config/__init__.py
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/config/config-docker.ini
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/config/config-test.ini
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/config_constants.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/db/db_interface.py
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/db/db_pg_interface.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/db/db_utils_no_circ.py
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/documentation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/email/email_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/email/patch_ems.py
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/exceptions/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/interpreter/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/migrations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/migrations/migrations.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/base_controller.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/exception_queries.py
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/generated_queries.py
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/handmade_queries.py
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/mvc/model_interface.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/openapi/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/services/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/services/patch_mms.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/__init__.py
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/crypt_utils.py
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/options.py
RENAMED
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{jaaql-middleware-python-4.21.34 → jaaql-middleware-python-4.21.36}/jaaql/utilities/vault.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|