nodecraft / crafthead

Super scalable Minecraft avatar generation, built on Cloudflare Workers
https://crafthead.net
MIT License
84 stars 7 forks source link

Cape Endpoint headers #58

Open bribes opened 2 years ago

bribes commented 2 years ago

For the cape endpoint headers make it not respond with the x-crafthead-skin-model instead respond with a header to show the texture identifier.

TibiNonEst commented 2 years ago

Hmm, given we have to fetch the texture URL for a request anyway, we could add an X-Crafthead-Texture-ID to every request, it'd be nice to hear what @astei thinks of this tho. Removing X-Crafthead-Skin-Model from cape requests makes sense.

TibiNonEst commented 2 years ago

There's also the question of whether avatars, helms, busts, etc should return the X-Crafthead-Skin-Model header or only the skin endpoint. My thinking when adding that header in is that since we're already making a request to Mojang's servers and have the model, why make someone using the API make an extraneous request?

bribes commented 2 years ago

There's also the question of whether avatars, helms, busts, etc should return the X-Crafthead-Skin-Model header or only the skin endpoint. My thinking when adding that header in is that, since we're already making a request to Mojang's servers and have the model, someone using the API might find it useful to not have to make an extrenous request.

I think you should only have the header if the render is effected by the model.

bribes commented 2 years ago

oops

TibiNonEst commented 2 years ago

I think you should only have the header if the render is effected by the model.

That would mean only body and bust renders. Do you think skin requests should return the header as well? It could be useful to someone using the service. But yes I agree that renders not affected do not need the header.

bribes commented 2 years ago

I think you should only have the header if the render is effected by the model.

That would mean only body and bust renders. Do you think skin requests should return the header as well? It could be useful to someone using the service. But yes I agree that renders not affected do not need the header.

maybe