Wykres commitów

24 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 7ac1006021
background task bug fix: override task runner host
we were using request.host_url blindly, which was fed.brid.gy for user-facing requests, but bridgy-federated.uc.r.appspot.com for tasks. #335
2023-01-05 15:05:35 -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 47aec1c5ea
use util.is_web() more 2022-12-10 09:09:44 -08:00
Ryan Barrett 2fdc6f29a9
sign HTTP GET requests for AS2 objects
to support Mastodon's AUTHORIZED_FETCH aka secure mode: https://docs.joinmastodon.org/admin/config/#authorized_fetch

fixes #291
2022-11-24 09:41:14 -08: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 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 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 ee7b324525
bring back HOST_URL override to fed.brid.gy, for URLs emitted into AP 2019-12-26 18:18:44 -08:00
Ryan Barrett 3cdd58dfbf
python 3: replace a few errant unicodes with strs 2019-12-26 07:57:33 -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 99a5c35ae3
switch from webutil.util.memcache_response to cache_response 2019-11-12 21:28:44 -08:00
Ryan Barrett c623a295c6
misc noop cleanups based on LGTM alerts
https://lgtm.com/projects/g/snarfed/bridgy/?mode=list
2019-09-19 11:57:16 -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 bb9294ea51 tell common.error() explicitly when to include exc_info 2017-10-17 11:47:01 -07:00
Ryan Barrett 6190f3bc0c refactor abort() calls to use common.error() 2017-10-15 16:57:33 -07:00
Ryan Barrett 8e2406caa4 add_webmention: unquote input URL 2017-10-01 07:00:32 -07:00
Ryan Barrett fcef1e84ec switch from request.host_url to appengine_config.HOST_URL
...because for requests that were redirected, request.host_url would sometimes lose port. no clue how or why.

e.g. testing mastodon interop locally with me@www.brid.gy, mastodon would fetch

  https://www.brid.gy/.well-known/webfinger?resource=acct:me@www.brid.gy

which would 302 redirect to

  http://localhost:8080/.well-known/webfinger?resource=acct:me@www.brid.gy

and in that request, request.host_url would be http://localhost. but if i curled that second webfinger URL directly, request.host_url would be http://localhost:8080. weird.
2017-09-30 07:56:40 -07:00
Ryan Barrett ec348a46bb add ?endpoint query param to /wm/ proxy 2017-08-15 12:04:38 -07:00
Ryan Barrett 23180c7db0 add /wm/... URL proxy that injects our webmention endpoint 2017-08-15 12:02:02 -07:00