You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I was following the tutorial but when I search it does not filter down the queries and when I checked the network tab of chrome tools, I saw it is requesting the favicon multiple times. when I checked the server console I saw that the server has responded 304 error. I searched around this error a lot. everyone is saying it is because of cache and etag but disabling that didn't have any result.
These are my last attempts:
// SongsController:
module.exports={asyncindex(req,res){try{letsongs=nullconstsearch=req.query.searchif(search){songs=awaitSong.findAll({where: {[Op.or]: ['title','artist','genre','album'].map(key=>({[key]: {[Op.like]: `%${search}%`}}))}})}else{songs=awaitSong.findAll({limit: 10})}res.header('Cache-Control','no-cache, no-store, must-revalidate')res.header('Pragma','no-cache')res.header('Expires',0)res.header('Cache-Control','no-cache, no-store, must-revalidate')res.send(songs)}catch(err){res.status(500).send({error: 'an error has occured trying to fetch the songs'})}},
Hello,
I was following the tutorial but when I search it does not filter down the queries and when I checked the network tab of chrome tools, I saw it is requesting the favicon multiple times. when I checked the server console I saw that the server has responded 304 error. I searched around this error a lot. everyone is saying it is because of cache and
etag
but disabling that didn't have any result.These are my last attempts:
// SongsController:
// SongsSearchPanel
// SongsPanel
Thanks in advance.
The text was updated successfully, but these errors were encountered: