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?
Can't find a movie or TV show? Login to create it.
Vil du vurdere eller legge til dette elementet i en liste?
Ikke et medlem?
Svar av Travis Bell
den 31 Desember 2016 kl. 2:22 AM
Hi @danelkhen I thought I had exposed the methods in the OPTIONS request... I'll have to take a look at this.
Svar av danelkhen
den 31 Desember 2016 kl. 3:21 AM
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.
Svar av danelkhen
den 31 Desember 2016 kl. 3:37 AM
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
Svar av Travis Bell
den 31 Desember 2016 kl. 12:01 PM
Cool, thanks for the info. I'll have a look at this on Monday when I get back to work.
Cheers.
Svar av Travis Bell
den 19 April 2017 kl. 7:26 PM
By the way, the rate limit headers should now be readable properly.
Svar av danelkhen
den 20 April 2017 kl. 2:49 AM
Great thanks! :-)