Skip to content
Merged
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
1 change: 1 addition & 0 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<a href="https://storybook.spacecorps.tech">Storybook</a>
<a href="/privacy.html">Privacy</a>
<a href="/contact.html">Contact</a>
<a href="mailto:hello@spacecorpstechnology.com">hello@spacecorpstechnology.com</a>
</div></footer>
<script src="/wave.js" defer></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The site does not install the React package: it is a static site with no React c

## Agent-facing files (single source: this repo)

All served from the site root and maintained only here: `llms.txt`, `index.md` (Markdown of the home page), `openapi.json` (the hosted spaceemit API), `robots.txt`, `sitemap.xml`. There is deliberately no MCP server card, sandbox, API-key service or `.well-known/` agent metadata: none of those existed behind the old files (the advertised MCP endpoint returned 404). Add them back only when the service is real.
All served from the site root and maintained only here: `llms.txt`, `index.md` (Markdown of the home page), `openapi.json` (the hosted spaceemit API), `robots.txt`, `sitemap.xml`. There is deliberately no MCP server card, sandbox or API-key service, and `.well-known/` holds only `security.txt`: none of those existed behind the old files (the advertised MCP endpoint returned 404). Add them back only when the service is real.

## Develop, build, run

Expand Down
1 change: 1 addition & 0 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ <h2>Elsewhere</h2>
<a href="https://storybook.spacecorps.tech">Storybook</a>
<a href="/privacy.html">Privacy</a>
<a href="/contact.html">Contact</a>
<a href="mailto:hello@spacecorpstechnology.com">hello@spacecorpstechnology.com</a>
</div></footer>
<script src="/wave.js" defer></script>
</body>
Expand Down
5 changes: 4 additions & 1 deletion contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ <h2>Questions, bugs and feature requests</h2>
<li><strong>obop:</strong> <a href="https://github.com/SpaceCorps/obop/issues">obop issues</a>.</li>
<li><strong>Any other tool:</strong> open an issue in its repository on <a href="https://github.com/SpaceCorps">github.com/SpaceCorps</a>.</li>
</ul>
<h2>Email</h2>
<p>General questions: <a href="mailto:hello@spacecorpstechnology.com">hello@spacecorpstechnology.com</a>.</p>
<h2>Security</h2>
<p>Please report vulnerabilities privately with GitHub's &ldquo;Report a vulnerability&rdquo; on the affected repository (Security tab), not in a public issue.</p>
<p>Please report vulnerabilities privately, not in a public issue: email <a href="mailto:security@spacecorpstechnology.com">security@spacecorpstechnology.com</a>, or use GitHub's &ldquo;Report a vulnerability&rdquo; on the affected repository (Security tab).</p>
<h2>Company</h2>
<p>SpaceCorps Technology AB, Sweden.</p>
</div>
Expand All @@ -53,6 +55,7 @@ <h2>Company</h2>
<a href="https://storybook.spacecorps.tech">Storybook</a>
<a href="/privacy.html">Privacy</a>
<a href="/contact.html">Contact</a>
<a href="mailto:hello@spacecorpstechnology.com">hello@spacecorpstechnology.com</a>
</div></footer>
<script src="/wave.js" defer></script>
</body>
Expand Down
54 changes: 35 additions & 19 deletions deploy/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,56 @@
# Static site for spacecorps.tech. Listens on :80 inside the container; Sliplane terminates TLS.
# The handle blocks are mutually exclusive and checked in order, so /healthz answers for any host.
{
auto_https off
admin off
}

:80 {
root * /srv
encode zstd gzip

handle /healthz {
respond "ok" 200
}

header {
X-Content-Type-Options nosniff
Referrer-Policy strict-origin-when-cross-origin
X-Frame-Options SAMEORIGIN
# Old company domain: redirect to the apex, keeping path and query.
@oldcompany host spacecorpstechnology.com www.spacecorpstechnology.com
handle @oldcompany {
redir https://spacecorps.tech{uri} permanent
}

@www host www.spacecorps.tech
handle @www {
redir https://spacecorps.tech{uri} permanent
}

# Markdown and text are served as UTF-8 text for people and agents.
@text path *.md *.txt
header @text Content-Type "text/plain; charset=utf-8"
@md path *.md
header @md Content-Type "text/markdown; charset=utf-8"
handle {
root * /srv
encode zstd gzip

header {
X-Content-Type-Options nosniff
Referrer-Policy strict-origin-when-cross-origin
X-Frame-Options SAMEORIGIN
}

# Markdown and text are served as UTF-8 text for people and agents.
@text path *.md *.txt
header @text Content-Type "text/plain; charset=utf-8"
@md path *.md
header @md Content-Type "text/markdown; charset=utf-8"

@fonts path /fonts/*
header @fonts Cache-Control "public, max-age=31536000, immutable"
@media path /blog/media/*
header @media Cache-Control "public, max-age=86400"
@fonts path /fonts/*
header @fonts Cache-Control "public, max-age=31536000, immutable"
@media path /blog/media/*
header @media Cache-Control "public, max-age=86400"

file_server {
precompressed gzip
file_server {
precompressed gzip
}
}

handle_errors {
rewrite * /404.html
file_server
file_server {
root /srv
}
}
}
79 changes: 33 additions & 46 deletions docs/REDIRECTS.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,43 @@
# Domain and redirect plan

Plan only. Nothing here has been applied: no DNS or Sliplane settings were changed.

## Target state

| Host | Serves |
| --- | --- |
| `spacecorps.tech` | **this site** (canonical company home) |
| `www.spacecorps.tech` | 301 to `https://spacecorps.tech{uri}` |
| `play.spacecorps.tech` | game downloads (the `play` repo's static site) |
| `storybook.spacecorps.tech` | Storybook (SpaceCorps/storybook) |
| `web.spacecorps.xyz`, `spacecorps.xyz` | browser build of the game (unchanged) |
| `obop.dev`, `space3d.dev` | product sites (unchanged) |
| `spacecorpstechnology.com`, `www.` | 301 to `https://spacecorps.tech{uri}` (old site, title "SpaceCorps Technology") |
| `spacecorps.eu`, `spacecorps.online`, and their `www.` | 301 to `https://spacecorps.tech{uri}` |
| `spacecorps.github.io` | old GitHub Pages site; see below |

## Steps (in order)

1. **Sliplane**: deploy this repo's `Dockerfile` as a service (port 80, health check `/healthz`). Check it on the temporary `*.sliplane.app` URL first.
2. **DNS, `spacecorps.tech`**: add the custom domain in Sliplane, then create the record it shows (CNAME for `www`; for the apex, the A/ALIAS record Sliplane specifies). Wait for the certificate; `https://spacecorps.tech/healthz` must return `ok`. Same procedure for `play.` and `storybook.` (`storybook` is described in the storybook README).
3. **Redirect domains**: either (a) give each domain's DNS to Sliplane and add all four as custom domains of a second tiny service running the redirect Caddy below, or (b) use the registrar's / Cloudflare's own redirect rule if the zone is on Cloudflare (a single "redirect all, keep path, 301" rule per domain). (b) needs no extra container; (a) keeps everything in one place. Recommendation: (b) for the three domains that are only redirects.
4. **Last**: switch the old content off only after step 2 works, and keep the redirects for at least a year.

## Redirect-only Caddyfile (option a)

```caddyfile
{
auto_https off
admin off
}

:80 {
@health path /healthz
respond @health "ok" 200
redir https://spacecorps.tech{uri} permanent
}
```
# Domain and redirect setup

What is live, and what is still open.

## State

| Host | Serves | How |
| --- | --- | --- |
| `spacecorps.tech` | this site | Sliplane service `spacecorps-site` (this repo's Dockerfile, port 80, health check `/healthz`) |
| `www.spacecorps.tech` | 301 to `https://spacecorps.tech{uri}` | `deploy/Caddyfile` (needs the host added as a custom domain on the service) |
| `spacecorpstechnology.com`, `www.` | 301 to `https://spacecorps.tech{uri}`, path and query kept | Custom domains on `spacecorps-site`, redirected by `deploy/Caddyfile`. **Google Workspace MX records are kept untouched**: only the web records (apex and `www`) point at Sliplane. |
| `spacecorps.eu`, `spacecorps.online` | 301 to `https://spacecorps.tech` | Namecheap "URL Redirect" records (301, **http only**: there is no certificate, so `https://spacecorps.eu` shows a certificate error until these move to a Caddy-served custom domain) |
| `play.spacecorps.tech` | game downloads (`play` repo) | separate service |
| `storybook.spacecorps.tech` | Storybook | separate service, see the storybook README |
| `web.spacecorps.xyz`, `obop.dev`, `space3d.dev` | unchanged | |
| `spacecorps.github.io` | old GitHub Pages site | see below |

Company email is on `@spacecorpstechnology.com` (Google Workspace): `hello@` for general contact, `security@` for vulnerability reports (also published in `/.well-known/security.txt`). That is why the domain's MX must stay as it is.

Run it as `caddy:2-alpine` with that file at `/etc/caddy/Caddyfile`. TLS is terminated by Sliplane, so every hostname must be added as a custom domain of this service for certificates to be issued. Add `www.spacecorps.tech` here as well.
## The Caddy rules

## `spacecorps.github.io`
`deploy/Caddyfile` uses ordered, mutually exclusive `handle` blocks: `/healthz` first (answers `ok` for every host, so health checks never get redirected), then the two redirect host matchers, then the static site. Check locally:

GitHub Pages cannot redirect by HTTP status. This PR removes the Pages workflow, so the last deployed old version stays online until Pages is disabled. Options, after `spacecorps.tech` is live: (1) leave it (project pages such as `spacecorps.github.io/Sliplane-Cli/` and `/play/` keep working, and they are linked from many places); (2) replace `index.html` on a small branch with a meta-refresh and `rel=canonical` to `https://spacecorps.tech/`. Do **not** set `spacecorps.tech` as the Pages custom domain: that would move every project page (`/Sliplane-Cli/`, `/open-glass/` ...) under `spacecorps.tech/<repo>/`.
```bash
docker build -t spacecorps-tech . && docker run -d --name t -p 8081:80 spacecorps-tech
curl -sI -H 'Host: spacecorpstechnology.com' 'localhost:8081/about.html?x=1' # 301, Location: https://spacecorps.tech/about.html?x=1
curl -s -H 'Host: spacecorpstechnology.com' localhost:8081/healthz # ok
```

## Open

## Checks after cutover
- `https://spacecorps.eu` and `https://spacecorps.online` (https) do not redirect. Fix: add both (and `www.`) as custom domains on `spacecorps-site` and extend the `@oldcompany` matcher in the Caddyfile, then drop the Namecheap redirects.
- `spacecorps.github.io`: GitHub Pages cannot send HTTP redirects. Project pages such as `/Sliplane-Cli/` and `/play/` keep working there, so leave the org site as is, or replace its index with a meta refresh. Do **not** set `spacecorps.tech` as its Pages custom domain: that would move every project page under `spacecorps.tech/<repo>/`.
- Update the `homepage` field of repositories that still point at `spacecorps.github.io` or `spacecorpstechnology.com` (for example `SpaceCorps/web`), add `spacecorps.tech` to Google Search Console and use "Change of address" for spacecorpstechnology.com. Keep the redirects for at least a year.

## After a change

```bash
for h in spacecorpstechnology.com www.spacecorpstechnology.com spacecorps.eu spacecorps.online www.spacecorps.tech; do
for h in spacecorpstechnology.com www.spacecorpstechnology.com www.spacecorps.tech; do
curl -sI "https://$h/about.html" | grep -iE '^(HTTP|location)'
done # expect 301 and Location: https://spacecorps.tech/about.html
curl -s https://spacecorps.tech/healthz # ok
```

Also update: the `homepage` field of the GitHub org and of the repositories that point at `spacecorps.github.io` or `spacecorpstechnology.com` (for example `SpaceCorps/web`), Google Search Console (add `spacecorps.tech`, submit the sitemap, use "Change of address" for spacecorpstechnology.com).
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ <h2>From the blog</h2>
<a href="https://storybook.spacecorps.tech">Storybook</a>
<a href="/privacy.html">Privacy</a>
<a href="/contact.html">Contact</a>
<a href="mailto:hello@spacecorpstechnology.com">hello@spacecorpstechnology.com</a>
</div></footer>
<script src="/wave.js" defer></script>
</body>
Expand Down
3 changes: 2 additions & 1 deletion privacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h2>The game</h2>
<h2>Our command-line tools</h2>
<p>They send no telemetry. API credentials you give a tool are stored in your operating system's keystore (macOS Keychain, Linux Secret Service or Windows DPAPI) and are sent only to the service the tool talks to. Each tool's repository documents what it contacts.</p>
<h2>Contact</h2>
<p>Questions about privacy: see <a href="/contact.html">Contact</a>.</p>
<p>Questions about privacy: <a href="mailto:hello@spacecorpstechnology.com">hello@spacecorpstechnology.com</a> (see also <a href="/contact.html">Contact</a>).</p>
</div>
</main>
<footer><div class="wrap">
Expand All @@ -50,6 +50,7 @@ <h2>Contact</h2>
<a href="https://storybook.spacecorps.tech">Storybook</a>
<a href="/privacy.html">Privacy</a>
<a href="/contact.html">Contact</a>
<a href="mailto:hello@spacecorpstechnology.com">hello@spacecorpstechnology.com</a>
</div></footer>
<script src="/wave.js" defer></script>
</body>
Expand Down
4 changes: 4 additions & 0 deletions public/.well-known/security.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Contact: mailto:security@spacecorpstechnology.com
Expires: 2027-11-19T00:00:00.000Z
Preferred-Languages: en, sv
Canonical: https://spacecorps.tech/.well-known/security.txt
2 changes: 2 additions & 0 deletions public/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ SpaceCorps Technology AB builds a space MMO, the Space3d engine it runs on, an o
## More

[Blog](https://spacecorps.tech/blog/) · [About](https://spacecorps.tech/about.html) · [Contact](https://spacecorps.tech/contact.html) · [Privacy](https://spacecorps.tech/privacy.html)

Email: hello@spacecorpstechnology.com · security reports: security@spacecorpstechnology.com
1 change: 1 addition & 0 deletions public/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
## Site

- [Blog](https://spacecorps.tech/blog/)
- Email: hello@spacecorpstechnology.com (general), security@spacecorpstechnology.com (vulnerability reports; also GitHub private vulnerability reporting)
- [About](https://spacecorps.tech/about.html), [Contact](https://spacecorps.tech/contact.html), [Privacy](https://spacecorps.tech/privacy.html)
- [Markdown version of the home page](https://spacecorps.tech/index.md)
- [Sitemap](https://spacecorps.tech/sitemap.xml)
Expand Down
1 change: 1 addition & 0 deletions scripts/_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<a href="https://storybook.spacecorps.tech">Storybook</a>
<a href="/privacy.html">Privacy</a>
<a href="/contact.html">Contact</a>
<a href="mailto:hello@spacecorpstechnology.com">hello@spacecorpstechnology.com</a>
</div></footer>
<script src="/wave.js" defer></script>
</body>
Expand Down
6 changes: 4 additions & 2 deletions scripts/_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ def card(tag, name, desc, links):
<li><strong>obop:</strong> <a href="https://github.com/SpaceCorps/obop/issues">obop issues</a>.</li>
<li><strong>Any other tool:</strong> open an issue in its repository on <a href="https://github.com/SpaceCorps">github.com/SpaceCorps</a>.</li>
</ul>
<h2>Email</h2>
<p>General questions: <a href="mailto:hello@spacecorpstechnology.com">hello@spacecorpstechnology.com</a>.</p>
<h2>Security</h2>
<p>Please report vulnerabilities privately with GitHub's &ldquo;Report a vulnerability&rdquo; on the affected repository (Security tab), not in a public issue.</p>
<p>Please report vulnerabilities privately, not in a public issue: email <a href="mailto:security@spacecorpstechnology.com">security@spacecorpstechnology.com</a>, or use GitHub's &ldquo;Report a vulnerability&rdquo; on the affected repository (Security tab).</p>
<h2>Company</h2>
<p>SpaceCorps Technology AB, Sweden.</p>
</div>
Expand All @@ -110,7 +112,7 @@ def card(tag, name, desc, links):
<h2>Our command-line tools</h2>
<p>They send no telemetry. API credentials you give a tool are stored in your operating system's keystore (macOS Keychain, Linux Secret Service or Windows DPAPI) and are sent only to the service the tool talks to. Each tool's repository documents what it contacts.</p>
<h2>Contact</h2>
<p>Questions about privacy: see <a href="/contact.html">Contact</a>.</p>
<p>Questions about privacy: <a href="mailto:hello@spacecorpstechnology.com">hello@spacecorpstechnology.com</a> (see also <a href="/contact.html">Contact</a>).</p>
</div>
"""
page("privacy.html", "Privacy | SpaceCorps", "What spacecorps.tech and SpaceCorps tools collect: nothing on this site, and links to the game policy.", "/privacy.html", privacy)
Expand Down
Loading