Skip to content
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

Gateway Server #541

Merged
merged 11 commits into from
Jan 12, 2015
Merged

Gateway Server #541

merged 11 commits into from
Jan 12, 2015

Conversation

mappum
Copy link
Contributor

@mappum mappum commented Jan 12, 2015

This PR adds a second HTTP server that serves IPFS objects, without giving access to the command API (so that it can be used for public services, like ipfs.io). It is off by default, but will listen when there is an address specified at the Addresses.Gateway key in the config.

This also fixes MIME type handling in the gateway so that web apps will be function correctly when served from the gateway or API server.

@zignig's directory listing changes were included.

A redirect was added from /webui on the API server to the hash of the webui app root. In the future, we can change the hash to an IPNS path, and update the webui by publishing to that IPNS name.

mappum and others added 8 commits January 11, 2015 22:15
@btc btc added the status/in-progress In progress label Jan 12, 2015
@whyrusleeping
Copy link
Member

image

👍

@jbenet
Copy link
Member

jbenet commented Jan 12, 2015

The description of this PR makes me very happy.

// if there is an error (invalid address), then don't run the gateway
gatewayMaddr, _ := ma.NewMultiaddr(cfg.Addresses.Gateway)
if gatewayMaddr == nil {
fmt.Println("Invalid gateway address, not running gateway")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to just not display anything to the user, since it's normal operation. maybe just log.Info? and 👍 on the comment re: error

@jbenet
Copy link
Member

jbenet commented Jan 12, 2015

I fixed up this PR. Merging after green.

jbenet added a commit that referenced this pull request Jan 12, 2015
@jbenet jbenet merged commit b299c42 into master Jan 12, 2015
@jbenet jbenet removed the status/in-progress In progress label Jan 12, 2015
@jbenet jbenet deleted the gateway-server branch January 12, 2015 09:10
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants