openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Mitchell <moose...@gmail.com>
Subject Re: vanity urls for web actions
Date Sat, 18 Feb 2017 20:11:36 GMT
i would place this pretty high up on the list of requirements for
supporting serverless web apps (e.g. without it, secure cookies and local
storage are not possible).

yes, we could require a separate reverse proxy front-end, but for a couple
of lines of static nginx config, this seems like a pretty easy choice, to
me.

nick

On Fri, Feb 17, 2017 at 2:39 PM, Rodric Rabbah <rodric@gmail.com> wrote:

> I submitted a pull request after playing around with this locally to allow
> our edge router to rewrite URLs to provide a vanity URL for web actions in
> a namespace; it's a handful of lines to the edge nginx configuration file.
> It matches the namespace from the server name and rewrites the request to
> the fully qualified web action name.
>
> So  https://guest.openwhisk.host/public/index.html
> becomes a proxy for
>       https://openwhisk.host/api/v1/experimental/web/guest/public/
> index.html
>
>
> For added convenience, and by convention:
>       https://guest.openwhisk.host becomes a proxy for
>       https://openwhisk.host/api/v1/experimental/web/guest/public/
> index.html
>
> This of course requires DNS resolution or an entry in /etc/hosts for it to
> work locally.
>
> For example:
> > grep guest /etc/hosts 192.168.99.100  guest.dockerhost
>
> But this makes for a mich nicer URLs even for recording local demos.
>
> https://github.com/openwhisk/openwhisk/pull/1871
>
> -r
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message