Skip to content

Commit

Permalink
Add AASA to bskylink (#4588)
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok authored Jun 20, 2024
1 parent 6e5c9e8 commit a6ea6c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bskylink/src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import {AppContext} from '../context.js'
import {default as create} from './create.js'
import {default as health} from './health.js'
import {default as redirect} from './redirect.js'
import {default as siteAssociation} from './siteAssociation.js'

export * from './util.js'

export default function (ctx: AppContext, app: Express) {
app = health(ctx, app) // GET /_health
app = siteAssociation(ctx, app) // GET /.well-known/apple-app-site-association
app = create(ctx, app) // POST /link
app = redirect(ctx, app) // GET /:linkId (should go last due to permissive matching)
return app
Expand Down
13 changes: 13 additions & 0 deletions bskylink/src/routes/siteAssociation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {Express} from 'express'

import {AppContext} from '../context.js'

export default function (ctx: AppContext, app: Express) {
return app.get('/.well-known/apple-app-site-association', (req, res) => {
res.json({
appclips: {
apps: ['B3LX46C5HS.xyz.blueskyweb.app.AppClip'],
},
})
})
}

0 comments on commit a6ea6c0

Please sign in to comment.