Hi,
When using the api directly from the browser, it works, but limit headers cannot be read, getting: Refused to get unsafe header "X-RateLimit-Limit"
If setting request header: "Access-Control-Expose-Headers": "X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset",
Browser performs an OPTIONS request, which fails.
Help?
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por Travis Bell
el 31 de diciembre de 2016 a las 02:22
Hi @danelkhen I thought I had exposed the methods in the OPTIONS request... I'll have to take a look at this.
Contestado por danelkhen
el 31 de diciembre de 2016 a las 03:21
Hi Travis, thanks for the quick reply!
If I recall correctly, I did notice some OPTIONS methods that worked, but I believe it happened mostly on POST requests only. Maybe it needs to be tested when the request contains the "Access-Control-Expose-Headers" header as well.
Contestado por danelkhen
el 31 de diciembre de 2016 a las 03:37
Another possible issue I found, when performing a specific multiSearch for query "the muppets", server fails with lua exception info: url: https://api.themoviedb.org/3/search/multi?api_key=xxx&language=en-US&query=the%20muppets&page=1&include_adult=false
response: <!DOCTYPE HTML>
stack traceback: ...oyed/tmdb-lua-api/current/models/elasticsearch/movie.lua: in function 'result' ...yed/tmdb-lua-api/current/models/elasticsearch/person.lua:113: in function 'map_known_for_by_ids' ...yed/tmdb-lua-api/current/models/elasticsearch/person.lua:131: in function 'result' ...oyed/tmdb-lua-api/current/models/elasticsearch/multi.lua:175: in function 'results' ...deployed/tmdb-lua-api/current/applications/v3/search.lua:130: in function <...deployed/tmdb-lua-api/current/applications/v3/search.lua:116>
Traceback
Contestado por Travis Bell
el 31 de diciembre de 2016 a las 12:01
Cool, thanks for the info. I'll have a look at this on Monday when I get back to work.
Cheers.
Contestado por Travis Bell
el 19 de abril de 2017 a las 19:26
By the way, the rate limit headers should now be readable properly.
Contestado por danelkhen
el 20 de abril de 2017 a las 02:49
Great thanks! :-)