Wykres commitów

24 Commity (96dba41c9b860da838624a6a44864814d690f609)

Autor SHA1 Wiadomość Data
Ryan Barrett 96dba41c9b
logging: use separate loggers for each module with their names 2022-02-11 22:38:56 -08:00
Ryan Barrett 2f28be09be
convert %-formatted strings with args in logging.* calls to f-strings 2021-12-27 22:45:57 -08:00
Ryan Barrett c6f0c417a0
/r: handle trailing garbage chars
fixes https://console.cloud.google.com/errors/CO-fpZfMq_6ktgE
2021-09-01 19:48:37 -07:00
Ryan Barrett 17d2066008
use @flask_util.cached 2021-08-28 07:18:46 -07:00
Ryan Barrett 32d9e2bf6c
move common.error() to webutil.flask_util
corresponds to snarfed/webutil@10c088cebd
2021-08-06 11:01:58 -07:00
Ryan Barrett a27ebc4697
Flask routing tweak, don't redirect URLs with empty path elements 2021-08-06 10:28:56 -07:00
Ryan Barrett 2e3360a54b
move Flask utils to oauth_dropins.webutil.flask_util
corresponds to snarfed/webutil@5574bb23fa
2021-07-17 21:22:13 -07:00
Ryan Barrett 371a92a5db
flask: port XrdOrJrdHandler, finish porting webfinger 2021-07-11 16:30:14 -07:00
Ryan Barrett b8be570d66
flask: port activitypub 2021-07-10 08:07:40 -07:00
Ryan Barrett bb5ae9910d
flask: port /wm/ 2021-07-08 07:25:44 -07:00
Ryan Barrett 5b8699bec1
flask: port /r/, start to port common 2021-07-07 21:02:13 -07:00
Ryan Barrett a4c5a8e4c5
redirect: handle single /s that got collapsed by the browser (etc) 2021-06-28 22:52:04 -07:00
Ryan Barrett 2bae0c999c
/r/: drop "User not found for domain" message on 404
security through obscurity (heh), no need to signal that spammers can make a user somehow to get their redirects working.
2021-03-11 20:31:48 -08:00
Ryan Barrett 1f977a7d5c
stop /r/ from being an open redirect by checking that we've seen the domain 2021-03-07 07:36:34 -08:00
Ryan Barrett 6b4089efe4
/r/ redirect endpoint: use HTTP 301, not 302 2021-03-06 21:47:08 -08:00
Ryan Barrett df6b0b58ba
unify request handler classes and handle_exception; move away from HOST[_URL]
fixes:
* https://console.cloud.google.com/errors/CN68rO-5sOK9cQ
* https://console.cloud.google.com/errors/CJWCu8b5_ureAg
* https://console.cloud.google.com/errors/CN6W4Zy7irzgOA
* https://console.cloud.google.com/errors/CN278MyjhZbtOQ
2020-01-31 14:40:11 -08:00
Ryan Barrett 02d36b3b1f
migrate to the app engine standard python 3 runtime!
https://cloud.google.com/appengine/docs/standard/python3/python-differences
https://cloud.google.com/appengine/docs/standard/python/migrate-to-python3/
2019-12-25 22:26:26 -08:00
Ryan Barrett ab55c9d62c
ujson.dumps/loads() => util.json_dumps/loads() 2019-12-24 23:26:58 -08:00
Ryan Barrett 99a5c35ae3
switch from webutil.util.memcache_response to cache_response 2019-11-12 21:28:44 -08:00
Ryan Barrett faf676e8bb
switch from json to ultrajson for performance
https://github.com/esnme/ultrajson/
2019-10-29 07:06:15 -07:00
Ryan Barrett 7c9a03c827
unify HTTP fetching, HTML and mf2 parsing, and error handling into webutil
see:
* snarfed/granary#171
* snarfed/webutil@f994884b2b
* snarfed/oauth-dropins@f5b6e73530
* snarfed/granary@284eb11508
2019-10-03 21:08:26 -07:00
Ryan Barrett 76686af538
cache lots of GET requests
this helps with requests that make external HTTP fetches, eg indieweb home pages/posts and federated profiles/posts, which change rarely.

in particular, outbound AP requests that get federated widely (eg Mastodon) result in all of those federated instances making the same bridgy fed requests at the same time, often within just a few seconds. more background: tootsuite/mastodon#4486
2019-04-16 11:05:18 -07:00
Ryan Barrett b7e8cd7d42
add conneg + AS2 support to /r/... redirect URLs
for pixelfed, #39. specifically, if the client asks for application/activity+json or application/ld+json (which pixelfed does), fetch and convert to AS2 instead of returning a 302 redirect.
2019-01-04 12:17:50 -08:00
Ryan Barrett e720e543d8
add /r/ redirect endpoint
for #16, #32. cc @swentel. more to come.
2018-10-14 07:42:28 -07:00