Fix for test notification returning a 404 behind a reverse proxy.

pull/292/head
morpheus65535 6 years ago
parent 71421de09e
commit bfb211ccda

@ -1744,12 +1744,12 @@ def test_url(protocol, url):
return dict(status=True, version=result)
@route(base_url + 'test_notification/<provider>', method='GET')
@route(base_url + 'test_notification/<protocol>/<provider:path>', method='GET')
@custom_auth_basic(check_credentials)
def test_notification(provider):
def test_notification(protocol, provider):
provider = urllib.unquote(provider)
apobj = apprise.Apprise()
apobj.add(provider)
apobj.add(protocol + "://" + provider)
apobj.notify(
title='Bazarr test notification',

@ -1366,8 +1366,14 @@
<script>
$('.test_notification').on('click', function() {
const url_field = $(this).prev().val();
const url_protocol = url_field.split(':')[0];
const url_string = url_field.split('://')[1];
alert(url_protocol);
alert(url_string);
$.ajax({
url: "{{base_url}}test_notification/" + encodeURIComponent($(this).prev().val()),
url: "{{base_url}}test_notification/" + url_protocol + "/" + encodeURIComponent(url_string),
beforeSend: function () {
$('#loader').addClass('active');
},

Loading…
Cancel
Save