►
Description
One of the biggest improvements in go-ipfs 0.5 from the browser perspective is the addition of subdomain gateways, which provide origin isolation for every website published on IPFS! Let lidel show you how in this lightning talk from the 0.5 Release Meetup.
For more information
+ read the go-ipfs 0.5 release announcement: https://blog.ipfs.io/2020-04-28-go-ipfs-0-5-0/
+ visit the project website: https://ipfs.io
+ or follow IPFS on Twitter: https://twitter.com/IPFS
Sign up to get IPFS news, including releases, ecosystem updates, and community announcements in your inbox, each Tuesday: https://ipfs.us4.list-manage.com/subscribe?u=25473244c7d18b897f5a1ff6b&id=cad54b2230
A
In
case
people
are
not
familiar
with
why
we
introduced
subdomain
gateways,
I
prepared
a
short
section
with
theory
and
then
a
quick
demo,
so
I'm
little
I'm
working
on
ipfs,
mostly
ipfs
in
in
web
browsers.
The
way
we
represent
ipfs
resources
and
trying
to
make
it
better
and
I
was
helping
with
implementing
some
domain
gateways
in
Co,
ipfs
0.5.
So
something
to
I
think
the
gist
of
the
problem
is
that
the
CID,
the
content
identifier
in
ipfs
it
specifies
the
content
route
most
of
people,
think
about
files
and
directories.
A
So
if
you
have
a
website
that
is
a
directory
and
you
have
index.html
inside
of
that,
so
the
root
of
that
root
directory
has
an
identifier
that
CID
and
that's
the
main
directory
of
your
website.
So
historically,
when
you
put
your
directory
with
your
website
on
ipfs,
you
could
load
it
from
path
gateways
and
those
gateways.
Look
like
this.
You
had
a
host
name
and
of
the
gateway
and
then
namespace
immutable,
ipfs
content
identifier,
and
that
was
the
route.
A
Your
content
route
and
your
website
was
under
that,
and
the
problem
was
that
was
a
single
origin
for
all
content
content
routes,
which
meant
all
websites
loaded
from
that
gateway.
That
way
are
the
same
origin
sandbox,
which
meant
meant
all
the
website
had
the
same
cookie
jar
or
local
storage,
but
also
they
shared
permissions
for
things
like
camera,
microphone,
video
and
others.
Everything
was
called
origin,
which
was
really
problematic
if
you
granted
the
permission
to
one
website,
every
other
IPS
website
had
that
permission.
A
You
still
have
your
own
hostname,
however.
The
namespace
is
moved
to
a
subdomain
and
the
content.
Identifier
is
the
very
first
label
on
the
dns
name,
which
means
each
cid
produced
unique
origin
per
every
content
root.
It's
a
super
important.
It
aligns
ipfs
abstractions
with
how
web
security
model
works,
how
its
implementing
web
browsers-
and
we
don't
like
thanks
to
this-
we
don't
need
to
do
any
additional
work
it
just
we
get
this
isolation
for
free
every
content.
Identify
route
gets
own
sandbox
and
it
also
means
you
can
see
here.
A
The
route
is
the
same
for
both
URL
and
I
P
of
s
content
route,
so
no
problem
with
previewing
static,
web
site
generator
builds
and
things
like
that.
So
that's
fine.
How
can
you
enable
subdomain
gateway
for
your
hostname?
So
in
go
ahead?
Efs
0.5,
you
got
config
file
and
there
was
already
a
section
about
Gateway
configuration
in
this
release.
We've
added
public
gateway
section
and
it's
like
a
map
which
has
a
net
hostname
as
a
key,
and
the
value
is
just
an
object
with
additional
flags
and
settings.
A
In
this
example,
I'm
using
example
that
come
as
the
name
of
your
gateway
and
all
you
need
to
do
is
just
like
define
the
hostname
and
then
enable
subdomains
for
that
hostname
by
setting
houstab
dimitru
and
specify
which
paths
should
be
exposed
on
that
hostname.
You
may
just
want
immutable
paths
and
you
don't
want
idns,
or
maybe
you
want
IDF
s
and
I
penis
and
don't
want
to
expose
a
API.
A
A
A
Can
see
in
the
configuration
you
can
see
it's
here
so
if
I
start
my
node
now,
it
will
get
interesting
because
it's
now
exposing
Gateway
on
a
local
host
on
this
port.
So
just
to
not
to
bother
you
too
much.
I
will
jump
directly
to
the
browser
demo.
So
if
we
open
a
chromium
browser
and
use
this
gateway
port
as
an
HTTP
proxy,
because
that's
an
interesting
feature
of
go
ipfs
0.5,
the
Gateway
port
is
now
HTTP
proxy,
which
enables
interesting
things
like
this
one,
because
you
can
see
I'm
starting
chromium
with
empty
profile.
A
So
it
looks
like
a
new
user
I
set
a
proxy
to
be
a
local
gateway
and
then
I
just
asked
it
open
this
URL.
So
the
URL
is
the
old-school
power
of
gateway
at
example.com,
its
ipfs
content,
hash
and
then
a
path.
So
let's
open
it
and
let's
open
it
in
the
new
screen
and
hopefully
yeah
that
they
did
not
lie
like
this
content.
Discovery
was
fast.
A
A
A
Okay,
so
this
is
the
old
school
URL
for
a
path
under
a
Spain,
and
when
you
set
up
your
subdomain
gateway,
it
will
handle
requests
of
the
old
gateways.
So
if
you
open
it,
the
CID
will
get
moved
to
a
subdomain.
But
that's
not
the
ruling
thing
it's
just
like
swapping
places.
What's
interesting
is
that
if
you
try
to
load
content
that
has
and
all
CID
V
0
the
CID
V
0
are
those
hashes
that
start
with
Q
M.
Everyone
is
familiar
with
them.
A
The
problem
is
those
are
in
Baileys
58
and
those
hashes
are
case,
sensitive
and
browsers
force
lower
case
on
the
host
names,
which
mean
they
will
break
the
hash,
if
you
put
this
case
sensitive
representation
in
a
subdomain.
So
we
support
representing
C
IDs
as
base
22.
However,
people
may
still
have
those
of
the
links
and
they
may
want
to
switch
to
a
new
subdomain
gateway
and
they
want
the
links
to
still
work.