Compare commits
2 Commits
1d2b1db9df
...
0d56235863
Author | SHA1 | Date | |
---|---|---|---|
0d56235863 | |||
5c80751484 |
@ -1,5 +1,5 @@
|
||||
[tool.bumpversion]
|
||||
current_version = "1.4.8"
|
||||
current_version = "1.4.9"
|
||||
commit = true
|
||||
tag = true
|
||||
tag_name = "{new_version}"
|
||||
|
18
app.py
18
app.py
@ -387,24 +387,6 @@ 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"],
|
||||
|
@ -60,7 +60,6 @@
|
||||
<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">
|
||||
@ -251,11 +250,6 @@
|
||||
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") }}', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user