diff --git a/onionr/httpapi/security/public.py b/onionr/httpapi/security/public.py index 4254e4e0..3b591504 100644 --- a/onionr/httpapi/security/public.py +++ b/onionr/httpapi/security/public.py @@ -51,11 +51,10 @@ class PublicAPISecurity: resp = httpheaders.set_default_onionr_http_headers(resp) # Network API version resp.headers['X-API'] = public_api.API_VERSION + # Delete some HTTP headers for Onionr user agents if g.is_onionr_client: del resp.headers['Content-Security-Policy'] del resp.headers['X-Frame-Options'] del resp.headers['X-Content-Type-Options'] - print('deleted') - print(resp.headers) public_api.lastRequest = epoch.get_rounded_epoch(roundS=5) return resp \ No newline at end of file diff --git a/onionr/static-data/www/mail/mail.js b/onionr/static-data/www/mail/mail.js index 5fa58f44..f0b493b3 100755 --- a/onionr/static-data/www/mail/mail.js +++ b/onionr/static-data/www/mail/mail.js @@ -269,7 +269,7 @@ function getSentbox(){ if (keys.length == 0){ threadPart.innerHTML = "nothing to show here yet." } - for (var i = 0; i < keys.length; i++) (function(i, resp){ + for (var i = keys.length - 1; i > 0; i--) (function(i, resp){ var entry = document.createElement('div') var obj = resp[i] var toLabel = document.createElement('span') @@ -334,7 +334,7 @@ fetch('/mail/getinbox', { }}) .then((resp) => resp.text()) // Transform the data into json .then(function(data) { - pms = data.split(',') + pms = data.split(',').reverse() if (callNext){ getInbox() }