Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
package main

import (
_ "embed"
"context"
"fmt"
"os"
"bytes"
"io"

"github.com/fastly/compute-sdk-go/fsthttp"
)

//go:embed welcome-to-compute.html
var welcomePage []byte

// The entry point for your application.
//
// Use this function to define your main request handling logic. It could be
Expand Down Expand Up @@ -71,7 +77,7 @@ func main() {
// Send a default synthetic response.
w.Header().Set("Content-Type", "text/html; charset=utf-8")

fmt.Fprintln(w, `<iframe src="https://developer.fastly.com/compute-welcome" style="border:0; position: absolute; top: 0; left: 0; width: 100%; height: 100%"></iframe>`)
io.Copy(w, io.NopCloser(bytes.NewReader(welcomePage)))
return
}

Expand Down
30 changes: 30 additions & 0 deletions welcome-to-compute.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>Welcome to Fastly Compute</title>
<link
rel="icon"
href="https://developer.fastly.com/favicon-32x32.png"
type="image/png"
/>
</head>
<body>
<iframe
src="https://developer.fastly.com/compute-welcome"
style="
border: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
"
></iframe>
</body>
</html>
Loading