GoogleCloudPlatform / govanityurls

Use a custom domain in your Go import path
Apache License 2.0
524 stars 131 forks source link

pages are not rendered with custom domain on app engine #9

Open rakyll opened 7 years ago

rakyll commented 7 years ago
$ curl rakyll.pizza/cheese
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content="rakyllpizza.appspot.com/cheese git https://github.com/rakyll/cheese">
<meta name="go-source" content="rakyllpizza.appspot.com/cheese https://github.com/rakyll/cheese https://github.com/rakyll/cheese/tree/master{/dir} https://github.com/rakyll/cheese/blob/master{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=https://godoc.org/rakyllpizza.appspot.com/cheese">
</head>
<body>
Nothing to see here; <a href="https://godoc.org/rakyllpizza.appspot.com/cheese">see the package on godoc</a>.
</body>
</html>%

Note the URLs are rakyllpizza.appspot.com/cheese not rakyll.pizza/cheese.

zombiezen commented 7 years ago

In your configuration, are you setting host:? This is actually the primary reason I added that field. I don't think App Engine plumbs enough info about custom domain names for us to be able to auto-detect. We could use the Host header field as in non-App Engine as the fallback.