JavaScript is required to use Bungie.net

Forums

originally posted in:BungieNetPlatform
originally posted in: CORS & API key: anyone found a fix?
8/13/2015 5:06:25 PM
2
We actually run our app on Angular and Heroku so hopefully I can help. For local development we use the livereload proxy [url]https://github.com/SteffanLong/DestinyTrialsReport/blob/master/Gruntfile.js#L282[/url] Its set up so if we send a request to our app at [b]/bungie/Destiny/SearchDestinyPlayer/1/Deej%20BNG/[/b] the proxy rewrites that to [b]http://bungie.net/Platform/Destiny/SearchDestinyPlayer/1/Deej%20BNG/[/b] for Heroku we write the server.js in the gruntfile [url]https://github.com/SteffanLong/DestinyTrialsReport/blob/master/Gruntfile.js#L93[/url] which ends up looking like this [url]https://gist.github.com/v-fedorov/1b06cb360fa72d2a08ed#file-server-js-L38[/url]. You would need to set the API key as a Heroku env variable [b]BUNGIE_API[/b]
English

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • trying to get it to work but i keep running into issues when running the $http.get command. Moved my request url to Heroku & added my X-API-Key header in my request. Unfortunately I'm getting back: [quote]XMLHttpRequest cannot load http://bungie-platform.herokuapp.com/proxy/Destiny/1/Stats/GetMembershipIdByDisplayName/MrBramme. Request header field X-API-Key is not allowed by Access-Control-Allow-Headers.[/quote] Was right on track until the api was added :)

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

  • Edited by VlakafatakafA: 8/14/2015 1:35:24 PM
    not sure what youre trying to do now lol have you tried setting it up through livereload without using herokuplatform? Just make sure your gruntfile has these changes https://github.com/SteffanLong/DestinyTrialsReport/commit/fa9933505449cfb91b211c84f1494de3a9525a7a

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

You are not allowed to view this content.
;
preload icon
preload icon
preload icon