relay/core/urls.py
Andros Fenollosa 349a5e1376 Add ActivityPub and RSS bridges serving virtual social.org feeds
Expose external accounts as virtual Org Social feeds that any client
can follow with a plain #+FOLLOW: line:

- /bridge/activitypub/@{user}@{instance}/ bridges a Mastodon or any
  ActivityPub account (WebFinger, actor and paginated outbox; only
  public top-level notes, with CW, hashtags, language and attachments)
- /bridge/rss/?url={feed} bridges any RSS/Atom feed (entry title as
  *** sub-heading, converted body and link to the original article)

Registration is implicit on first GET. Bridged data is stored in the
existing Profile/Post tables so /profile/, /search/ and the rest of
the API work on bridged feeds. Active bridges are refreshed every 15
minutes; bridges unrequested for 90 days are cleaned up.

Remote HTML is converted to Org text, escaping headline-like lines so
external content cannot inject posts. Fetches enforce the Webmention
SSRF protections, a 10s timeout and a 5MB size cap. Bridged posts
never queue Webmentions nor publish notifications.
2026-07-17 15:26:41 +02:00

41 lines
1.7 KiB
Python

"""
URL configuration for core project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/5.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.urls import path, include
from app.public.views import root_view
from app.feeds.views import FeedsView
urlpatterns = [
path("", root_view, name="root"),
path("feeds/", FeedsView.as_view(), name="feeds"),
path("feed-content/", include("app.feedcontent.urls")),
path("mentions/", include("app.mentions.urls")),
path("reactions/", include("app.reactions.urls")),
path("replies-to/", include("app.repliesto.urls")),
path("boosts/", include("app.boosts.urls")),
path("interactions/", include("app.interactions.urls")),
path("notifications/", include("app.notifications.urls")),
path("replies/", include("app.replies.urls")),
path("search/", include("app.search.urls")),
path("groups/", include("app.groups.urls")),
path("polls/", include("app.polls.urls")),
path("rss.xml", include("app.rss.urls")),
path("sse/", include("app.sse_notifications.urls")),
path("profile/", include("app.profile.urls")),
path("stats/", include("app.stats.urls")),
path("bridge/", include("app.bridge.urls")),
]