Wykres commitów

35 Commity (55d5206188603b3a4e9904e8fffa4ca50a109462)

Autor SHA1 Wiadomość Data
Ryan Barrett 55d5206188
cache 502s and 504s for requests that fetch users' sites
for #378
2023-01-24 16:29:19 -08:00
Ryan Barrett aa0dcbb222
noop: drop content type constants in common, use granary's instead 2023-01-06 21:01:33 -08:00
Ryan Barrett 42853fadad
work around negotiator crash with Chrome's new Accept header
https://github.com/CottageLabs/negotiator/issues/6 . thanks for reporting @gregorlove!
2023-01-02 09:44:10 -08:00
Ryan Barrett 4c383a3037
request caching tweaks, webfinger, use new flask_util.cached headers kwarg 2022-12-26 13:34:50 -08:00
Ryan Barrett 5f082349d5
/r/ handler: include Accept header in flask cache key
requires pending bug fix https://github.com/pallets-eco/flask-caching/pull/431
2022-12-26 09:52:08 -08:00
Ryan Barrett 2150693893
handle full conneg Accept header parsing in /r/ handler
for #352
2022-12-25 22:01:29 -08:00
Ryan Barrett 47aec1c5ea
use util.is_web() more 2022-12-10 09:09:44 -08:00
Ryan Barrett 50956c02b0
noop, rename Domain => User 2022-11-15 22:00:28 -08:00
Ryan Barrett 46f039af63
AP: always generate an actor for every outbound activity
for #279
2022-11-15 21:43:24 -08:00
Ryan Barrett 4f3dc03a3e
rename MagicKey => Domain, Response => Activity
the Python classes, but not (yet) the kinds in the datastore. maybe eventually.
2022-11-12 15:27:59 -08:00
Ryan Barrett 8e60346dc4
don't strip www, m, and mobile subdomains from user domains
fixes #267
2022-11-07 16:28:46 -08:00
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