Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

appc: support HTTP headers for discovery #210

Closed

Description

@bacongobbler

I was sifting through the app-container spec on image discovery when I stumbled across this:

If simple discovery fails, then we use HTTPS+HTML meta tags to resolve an app name to a downloadable URL.

This works for the general use case, but some URLs may not have a content type of text/html e.g. in the case of an API.

For example, if I had a SaaS product and I wanted to have a discoverable URL to our API's ACI, I'd like a URL like https://example.com/api. The top-level domain (https://example.com/) would be our landing page (implying text/html), but https://example.com/api may be where our SaaS's API begins (in this case, application/json or some equivalent).

Would it be possible to extend the image discovery to use HTTP headers (HTTP_X_AC_DISCOVERY?) in the case that the content-type is not text/html? Is there a way to work around this, or would a PR for this type of extension be appreciated? :)

Activity

  1. philips commented on Dec 5, 2014

    @philips
    Contributor

    Adding a section to the spec saying that a header might be returned too is fine with me.

    Ac-Discovery: {prefix} {template}
    

    Aside: the X- prefix on HTTP headers has been deprecated: https://tools.ietf.org/html/rfc6648

  2. philips commented on Dec 5, 2014

    @philips
    Contributor

    @bacongobbler Would you be willing to spec this out and add it to the app-container/discovery package?

  3. bacongobbler commented on Dec 5, 2014

    @bacongobbler
    Author

    certainly!

  4. jonboulle commented on Dec 5, 2014

    @jonboulle
    Contributor

    @bacongobbler please make sure to discuss the precedence/behaviour when both tags and headers are available, too :-)

  5. bacongobbler commented on Dec 5, 2014

    @bacongobbler
    Author

    of course. I'll whip up a PR to propose the change to the spec, which then you guys can all criticize before I start working on a solution.

  6. blalor commented on Dec 5, 2014

    @blalor

    I feel like there should be a DNS component to this, as well. Perhaps a TXT record?

  7. geekgonecrazy commented on Dec 8, 2014

    @geekgonecrazy

    I second @blalor suggestion. While a meta tag is easy enough to add. It'd be easier to use an api to change a TXT record.

  8. changed the title [-]support more than just ac-discovery HTML meta tags[/-] [+]appc: support HTTP headers for discovery[/+] on Dec 8, 2014
  9. philips commented on Dec 9, 2014

    @philips
    Contributor

    This issue was moved to appc/spec#7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions