Skip to content
Open
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: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
* text=auto eol=lf
*.png binary
*.woff2 binary

# Classify the repo by its product language (the Go CLI); the Worker/site
# TypeScript otherwise outweighs it in linguist stats.
web/** -linguist-detectable
worker/** -linguist-detectable
shared/** -linguist-detectable
9 changes: 9 additions & 0 deletions worker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ export default {
async fetch(request, env, executionContext): Promise<Response> {
const url = new URL(request.url);

// `go install shell.online/cmd/shell@latest` resolves the module by
// requesting any path with ?go-get=1 and reading this meta tag.
if (url.searchParams.get("go-get") === "1") {
return new Response(
'<!doctype html><meta name="go-import" content="shell.online git https://github.com/TeoSlayer/shell.online">\n',
{ headers: { "Content-Type": "text/html; charset=utf-8" } },
);
}

if (url.pathname === "/api/health" && request.method === "GET") {
return json({ ok: true, service: "shell.online", version: RELEASE_VERSION });
}
Expand Down