Commit Graph

7 Commits (4906cabc6b8d91136973ad159f6a02209ea8e166)

Author SHA1 Message Date
Eugen Rochko 63c7fe8e48
Refactor controllers for statuses, accounts, and more ()
ThibG 868568d1c1 Make host_meta/webfinger replies cacheable (fixes ) ()
* Make host_meta/webfinger replies cacheable (fixes )

Drop common code for handling users and sessions as webfinger queries
are very basic, public APIs.

Also explicitly mark results as cacheable with “expires_in”.

* Add “Vary: Accept” header for caching since content-negociation is used
Eugen Rochko 42bcbd36b7 Remove rabl dependency ()
* Remove rabl dependency

* Replicate old Oj configuration
ThibG d567a382e3 Ensure well_known controllers use WEB_DOMAIN by including RoutingHelper ()
This fixes .
Immae a94c152fd3 Allow alternate domains for mastodon handlers ()
Matt Jankowski 21a767dcfa Improve handling of HTTP_ACCEPT for webfinger ()
This change includes:

- Improve the spec coverage for incoming request to the webfinger action
- For requests without an accept header (ie, what a browser might look like),
  return a JSON response.
- For requests with an explicit format of xml or json, return that format.
- For requests using an accept header, return that format.

Also adds failing spec showing webfinger does not return xml, which covers the
issue described in: https://github.com/tootsuite/mastodon/issues/1983
Matt Jankowski 137100dcf3 Clean up well-known routes/controllers ()
* Add request spec for host meta route returning xml

* Add routing spec for xrd routes

* Update well-known routes

* Move webfinger and host-meta actions to their own controllers