Start a new topic

File Upload is returning an 'http' url to Google storage api instead of 'https'

The response URL containing the Google Storage url from the REST request to upload a file is suddenly returning an 'http' link instead of 'https' and failing as a result. Has there been a change?

Daniel,



Can you ensure that the TLS flag is set properly? You can see our RestAPI guide for reference:



http://devcenter.kinvey.com/rest/guides/files#SecurelycommunicatingwithGCS



Thanks,
I was not setting that flag, thanks!



Curious though, can't you detect from the incoming request whether or not the user is using TLS and then respond with the appropriate setting?
Daniel,



Can you be a little more specific about what you mean in your last question? If you set the TLS flag within your app, the user will make the request using TLS. In the event that your application is not using that flag they should be able to make the same requests using http without it failing. Can you give me some more context as to what you're asking.



Thanks,
On the server side, as you receive the request, can't you determine if the request itself was made with http or https and then return the appropriate url without the user needing to set the flag. Setting the flag would be an override over default behavior.



Really not a big deal, there are much more useful features you can be working on :smile:
Well, I'm thinking about this more in the context of an app or a page using Kinvey. If you just add the TLS flag to the request itself it should resolve to the https version every time. Unless someone has gone and disabled https in their browser / firewall (which is the opposite of security...) they should be able to load it without issue.



Login or Signup to post a comment