D
D
dani_ousi2020-11-05 18:12:22
MySQL
dani_ousi, 2020-11-05 18:12:22

Where is the apple-app-site-association nuxt.js file?

maybe someone came across, I need to place the apple-app-site-association file on the host so that it opens as json, like on Facebook https://www.facebook.com/apple-app-site-association . and if I put it in static, then it is downloaded when you click on the link. anyone know how to solve it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Влад Животнев, 2016-06-23
@kirill-93

max_allowed_packet , вестимо, если там речь не про сотни мегабайт.

A
Alexander Aksentiev, 2016-06-23
@Sanasol

https://support.rackspace.com/how-to/how-to-change...

Y
yarikswt, 2020-12-07
@yarikswt

I did this:

  1. Put apple-app-site-association.json in static folder
  2. Create an apple.js file in the middleware folder . And enter there:
    const appleJson = require('../static/apple-app-site-association.json')
    
    const handler = (req, res, next) => {
          res.setHeader('Content-type', 'application/json')
          res.statusCode = 200
          res.end(JSON.stringify(appleJson))
      }
      
      export default handler

  3. In nuxt.config.js we add the following thing:
    serverMiddleware: [
        { path: '/apple-app-site-association', handler: '@/middleware/apple.js' }
      ],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question