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

chore: switch to webui.ipfs.tech #2223

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg)](https://protocol.ai/) [![](https://img.shields.io/github/release/ipfs/ipfs-webui.svg)](https://github.com/ipfs/ipfs-webui/releases/latest) [![i18n status](https://img.shields.io/badge/i18n-translated-blue.svg)](https://www.transifex.com/ipfs/ipfs-webui/) [![](https://img.shields.io/badge/matrix%20chat-%23lobby:ipfs.io-blue.svg?style=flat-square)](https://matrix.to/#/#lobby:ipfs.io)

The [latest release version](https://github.com/ipfs/ipfs-webui/releases/latest) is always at https://webui.ipfs.io, and the preview of `main` branch is at https://dev.webui.ipfs.io.
The [latest release version](https://github.com/ipfs/ipfs-webui/releases/latest) is always at https://webui.ipfs.tech, and the preview of `main` branch is at https://dev.webui.ipfs.tech.

The IPFS WebUI is a **work-in-progress**. Help us make it better! We use the issues on this repo to track the work.

Expand Down Expand Up @@ -66,7 +66,7 @@ In separate shells run the following:

You must configure your Kubo RPC endpoint at http://127.0.0.1:5001 to allow [cross-origin (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests from your dev server at http://localhost:3000

Similarly if you want to try out pre-release versions at https://dev.webui.ipfs.io you need to add that as an allowed domain too.
Similarly if you want to try out pre-release versions at https://dev.webui.ipfs.tech you need to add that as an allowed domain too.

#### Easy mode

Expand All @@ -79,7 +79,7 @@ Run the **[cors-config.sh](./cors-config.sh)** script with:
#### The manual way

```sh
> ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://localhost:3000", "https://webui.ipfs.io", "http://127.0.0.1:5001"]'
> ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://localhost:3000", "https://webui.ipfs.tech", "http://127.0.0.1:5001"]'
> ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["POST"]'
```

Expand Down
2 changes: 1 addition & 1 deletion cors-config.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

ALLOW_ORIGINS='"http://localhost:3000", "https://webui.ipfs.io", "https://dev.webui.ipfs.io"'
ALLOW_ORIGINS='"http://localhost:3000", "https://webui.ipfs.tech", "https://dev.webui.ipfs.tech"'

# stop executing if anything fails
set -e
Expand Down
2 changes: 1 addition & 1 deletion src/components/is-not-connected/IsNotConnected.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const TABS = {

const IsNotConnected = ({ t, apiUrl, connected, sameOrigin, ipfsApiAddress, doUpdateIpfsApiAddress }) => {
const [activeTab, setActiveTab] = useState(TABS.UNIX)
const defaultDomains = ['http://localhost:3000', 'http://127.0.0.1:5001', 'https://webui.ipfs.io']
const defaultDomains = ['http://localhost:3000', 'http://127.0.0.1:5001', 'https://webui.ipfs.tech']
const origin = window.location.origin
const addOrigin = defaultDomains.indexOf(origin) === -1
return (
Expand Down
11 changes: 6 additions & 5 deletions src/env.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ describe('env.js', function () {
/**
* webui.ipfs deployed endpoints
*/
testOriginAndEnv('https://webui.ipfs.io', () => {}, 'webui.ipfs', 0)
testOriginAndEnv('https://webui-ipfs-io.ipns.dweb.link/', () => {}, 'webui.ipfs', 0)
testOriginAndEnv('https://webui.ipfs.tech', () => {}, 'webui.ipfs', 0)
testOriginAndEnv('https://webui-ipfs-tech.ipns.dweb.link/', () => {}, 'webui.ipfs', 0)
testOriginAndEnv('https://webui.ipfs.tech', () => {}, 'webui.ipfs', 0)
testOriginAndEnv('https://some-random-url', () => { throw new Error('no match on origin') }, 'webui.ipfs', 1)
testOriginAndEnv('https://some-random-url', () => ({ redirected: false, url: 'https://some-random-url/webui' }), 'webui.ipfs', 1)

/**
* local webui endpoints
*/
testOriginAndEnv('http://webui.ipfs.io.ipns.localhost:8080/', () => {}, 'local', 0)
testOriginAndEnv('http://webui-ipfs.io.ipns.localhost:8080/', () => {}, 'local', 0)
testOriginAndEnv('http://webui.ipfs.io.ipns.localhost:48080/', () => {}, 'local', 0) // brave
testOriginAndEnv('http://webui.ipfs.tech.ipns.localhost:8080/', () => {}, 'local', 0)
testOriginAndEnv('http://webui-ipfs-tech.ipns.localhost:8080/', () => {}, 'local', 0)
testOriginAndEnv('http://webui.ipfs.tech.ipns.localhost:48080/', () => {}, 'local', 0) // brave
testOriginAndEnv('http://webui-ipfs-tech.ipns.localhost:48080/', () => {}, 'local', 0) // brave
testOriginAndEnv('http://localhost:3000/', () => { throw new Error('no match on origin') }, 'local', 1)
testOriginAndEnv('http://127.0.0.1:3000/', () => { throw new Error('no match on origin') }, 'local', 1)
testOriginAndEnv('https://some-random-url.localhost:3333', () => ({ redirected: false, url: 'https://some-random-url.localhost:3333/webui' }), 'local', 1)
Expand Down
Loading