I am using a DropListener component and learned in another thread that the backend URL is required and needs to point to a server that has fastify running.
Getting the files backend URL to work should be pretty easy. Provide the glitch url to your instance for the ‘files Backend Url’. It should be something like https://.glitch.me
That should work for the project when deployed on Glitch. It doesn’t work when using a local server however.
In order to get this working i had to go to my glitch instance, and modify the server.js file. First i had to install a ‘cors’ package on the glitch server via NPM:
npm i -D @fastify/cors
Then I had to modify the server.js file as follows:
near the top:
import cors from ‘@fastify/cors’
before the fastify.get sttement:
fastify.register( cors, {
origin: false // disable cors completely
});
this is a good place to test to see if it works
Assuming it does work, you can replace the origin line with something more specific and secure
fastify.register( cors, {
origin: [
“https://glitch.com”, “https://192.168.1.93:3001”
]
});
by user 563549194137239552