Compare commits

..

No commits in common. "0d562358639cca270a97a5bc56fd5b2211ff48e6" and "1d2b1db9df0560233cffc1f9cef1a240192a7e83" have entirely different histories.

4 changed files with 26 additions and 2 deletions

View File

@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "1.4.9"
current_version = "1.4.8"
commit = true
tag = true
tag_name = "{new_version}"

View File

@ -1 +1 @@
1.4.9
1.4.8

18
app.py
View File

@ -387,6 +387,24 @@ def proxy_extra_urls():
return jsonify({"error": str(e)}), 502
@app.route('/extra_urls_file', methods=['GET'])
def proxy_extra_urls_file():
"""Proxies the request to get the extra_urls.txt file from the backend."""
if not session.get("config_logged_in"):
return jsonify({'error': 'Unauthorized'}), 401
backend_url = f"{app.config['BACKEND_URL']}/extra_urls_file"
credentials = base64.b64decode(session["auth_credentials"]).decode()
username, password = credentials.split(":", 1)
auth = requests.auth.HTTPBasicAuth(username, password)
try:
response = requests.get(backend_url, auth=auth)
return Response(response.content, status=response.status_code, mimetype=response.headers['Content-Type'])
except requests.exceptions.RequestException as e:
return jsonify({"error": str(e)}), 502
if __name__ == "__main__":
app.run(
debug=app.config["DEBUG"],

View File

@ -60,6 +60,7 @@
<input type="text" class="form-control" id="extra-url-input" placeholder="Enter Extra URL">
<div class="input-group-append">
<button class="btn btn-primary" id="add-extra-url-btn">Add</button>
<button class="btn btn-secondary" id="view-extra-urls-file-btn">View extra_urls.txt</button>
</div>
</div>
<table class="table table-striped">
@ -250,6 +251,11 @@
addExtraUrlBtn.addEventListener('click', addExtraUrl);
fetchExtraUrlsList();
const viewExtraUrlsFileBtn = document.getElementById('view-extra-urls-file-btn');
viewExtraUrlsFileBtn.addEventListener('click', () => {
window.open("{{ url_for('proxy_extra_urls_file') }}", '_blank');
});
// Other buttons
document.getElementById('send-test-notification-btn').addEventListener('click', function() {
fetch('{{ url_for("send_test_notification") }}', {