-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add vis/uuid/static/:w/:h.png #4153
Comments
if you feel strong enough add it to current milestone |
No Pain No Gain -Lo Wang |
We could have the target url to be a template in app_config.yml. For example: https://:username.:domain/api/v1/map/static/named/tpl_:id/width/height.png This way the user can choose to add a CDN url or any other publishing url. Just a idea |
@lbosque we use something like that in cartodb.js (and cartodb) https://github.com/CartoDB/cartodb.js/blob/develop/doc/API.md#how-to-set-a-different-host-than-cartodbcom |
That's right. So, the idea is that we set that url/template as configuration in app_config |
+1 to the config-based template, will do it |
@javisantana Small doubt: Format of the input urls is going to always be No organizations, no subdomainless versions, etc.? I must know that in order to skip all subdomainless, etc. logic or keep compatible with it. Also note we're not versioning at that URL, it is not an issue but a remark just in case. |
Config and output value: Where |
there are different things here: How to configure CDN
This url is in the form:
or
some requirements:
in this way we can use CDN for maps api for stuff like layergroups, not only static image. Service URLIn general everything it's public api should be under /api/vX, so embeds, static images, viz.json, tilejson and so on should be there. for static images:
for viz.json:
and in the future we have: for embeds (embeds should be api too):
for tilejson:
for exporting:
|
❤️ the Service URL proposal. So my money in this issue goes with:
Basically I'm agreeing on @javisantana proposal. |
Perfect! Just one thing: Careful with I can override this convention if you really see it important, but else I'd go with v1. And that self-answers my question of if I have to support subdomainless, etc. (yes as is another proper endpoint of |
Why I mean, if we already have I can understand that if we had a new API, let's say |
Ok, all solved (via chat): As the public-facing part of the API is just the vizjson, ok and clearer to go with |
And now, the big question: Privacy Should the endpoint require auth for retrieving non-public visualizations? I guess yes, because else is a quick way of exposing a screenshot of private maps if you somehow catch the uuid. |
privacy as always: using api_key you get the private+public+link ones and without it only public+link Do you see any case where you want to see a private viz shot? |
not initially, but I was thinking if for the dashboard... but then I can allow session auth too and no need for private key, so is not a concern, I just wanted to confirm. |
I missed the varnish cache and forcing same protocol that comes in the request, so adding that now |
this new endpoint should redirect to the named map url.
so
redirects to
The redirection should have cache headers and should return both http and https versions
Ideally it should redirect to CDN url version of that assets but I'm not sure we have that information in rails process
Branch:
4153-static-maps-redirects
The text was updated successfully, but these errors were encountered: