1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-11-28 16:27:11 +01:00

Compare commits

..

3 Commits
main ... aasa

Author SHA1 Message Date
alexismdr
00176c3cef fix: add aasa import in urls.py 2025-11-28 09:13:32 +01:00
alexismdr
de841c8143 feat: distribute aasa on .well-known/apple-app-site-association 2025-11-28 02:11:10 +01:00
alexismdr
43603d7359 feat: aasa view json distribution
* basic webcredentials config for password managers

See https://developer.apple.com/documentation/xcode/supporting-associated-domains for ref
2025-11-28 02:08:34 +01:00
2 changed files with 15 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ from django.views.defaults import bad_request, permission_denied, page_not_found
from member.views import CustomLoginView
from .admin import admin_site
from .views import IndexView
from .views import IndexView, apple_app_site_association
urlpatterns = [
# Dev so redirect to something random
@@ -33,6 +33,9 @@ urlpatterns = [
path('accounts/', include('django.contrib.auth.urls')),
path('api/', include('api.urls')),
path('permission/', include('permission.urls')),
# Apple App Site Association
path('.well-known/apple-app-site-association', apple_app_site_association),
]
# During development, serve static and media files

View File

@@ -6,6 +6,7 @@ from django.urls import reverse
from django.views.generic import RedirectView
from note.models import Alias
from permission.backends import PermissionBackend
from django.http import JsonResponse
class IndexView(LoginRequiredMixin, RedirectView):
@@ -28,3 +29,13 @@ class IndexView(LoginRequiredMixin, RedirectView):
# Non-Kfet members will don't see the transfer page, but their profile page
return reverse("member:user_detail", args=(user.pk,))
def apple_app_site_association(request):
data = {
"webcredentials": {
"apps": [
"P5246D3AFQ.org.crans.bde.note"
]
}
}
return JsonResponse(data)