diff options
author | Mike Crute <mike@crute.us> | 2022-12-03 15:55:22 -0800 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2022-12-03 15:55:22 -0800 |
commit | 3f7d75ab3947da84323eb735af76568795392b12 (patch) | |
tree | 0e9a6790b871fdb90c643557a262b3091a6c6883 | |
parent | 1b4775e4bbf02a247d7d7d36b61d9e95a4cddb27 (diff) | |
download | dockerfiles-3f7d75ab3947da84323eb735af76568795392b12.tar.bz2 dockerfiles-3f7d75ab3947da84323eb735af76568795392b12.tar.xz dockerfiles-3f7d75ab3947da84323eb735af76568795392b12.zip |
code-host: fix golang redirect
-rw-r--r-- | code-host/Makefile | 1 | ||||
-rw-r--r-- | code-host/code.crute.me | 20 |
2 files changed, 11 insertions, 10 deletions
diff --git a/code-host/Makefile b/code-host/Makefile index ed807e1..652bf8a 100644 --- a/code-host/Makefile +++ b/code-host/Makefile | |||
@@ -1,6 +1,7 @@ | |||
1 | IMAGE=docker.crute.me/code-host:latest | 1 | IMAGE=docker.crute.me/code-host:latest |
2 | 2 | ||
3 | all: | 3 | all: |
4 | @echo "Must update for new nginx minder"; exit 1 | ||
4 | cp ../nginx-common/main.go . | 5 | cp ../nginx-common/main.go . |
5 | CGO_ENABLED=0 go build -o nginx_bootstrap main.go | 6 | CGO_ENABLED=0 go build -o nginx_bootstrap main.go |
6 | rm -rf ./etc/nginx/ && cp -r ../nginx-common/conf ./etc/nginx/ | 7 | rm -rf ./etc/nginx/ && cp -r ../nginx-common/conf ./etc/nginx/ |
diff --git a/code-host/code.crute.me b/code-host/code.crute.me index 12b1599..1937391 100644 --- a/code-host/code.crute.me +++ b/code-host/code.crute.me | |||
@@ -31,11 +31,11 @@ server { | |||
31 | if ($arg_go-get = "1") { | 31 | if ($arg_go-get = "1") { |
32 | add_header Content-Type text/plain; | 32 | add_header Content-Type text/plain; |
33 | return 200 '<html><head> | 33 | return 200 '<html><head> |
34 | <meta name="go-import" content="code.crute.me/$user/$repo git https://code.crute.me/$user/$repo"> | 34 | <meta name="go-import" content="$host/$user/$repo git https://$host/$user/$repo"> |
35 | <meta name="go-source" content="code.crute.me/$user/$repo | 35 | <meta name="go-source" content="$host/$user/$repo |
36 | https://code.crute.me/$user/$repo | 36 | https://$host/$user/$repo |
37 | https://code.crute.me/$user/$repo/tree{/dir} | 37 | https://$host/$user/$repo/tree{/dir} |
38 | https://code.crute.me/$user/$repo/tree{/dir}/{file}#n{line}"> | 38 | https://$host/$user/$repo/tree{/dir}/{file}#n{line}"> |
39 | </head></html>'; | 39 | </head></html>'; |
40 | } | 40 | } |
41 | 41 | ||
@@ -77,11 +77,11 @@ server { | |||
77 | if ($arg_go-get = "1") { | 77 | if ($arg_go-get = "1") { |
78 | add_header Content-Type text/plain; | 78 | add_header Content-Type text/plain; |
79 | return 200 '<html><head> | 79 | return 200 '<html><head> |
80 | <meta name="go-import" content="code.crute.me/$user/$repo git https://code.crute.me/$user/$repo"> | 80 | <meta name="go-import" content="$host/$user/$repo git https://$host/$user/$repo"> |
81 | <meta name="go-source" content="code.crute.me/$user/$repo | 81 | <meta name="go-source" content="$host/$user/$repo |
82 | https://code.crute.me/$user/$repo | 82 | https://$host/$user/$repo |
83 | https://code.crute.me/$user/$repo/tree{/dir} | 83 | https://$host/$user/$repo/tree{/dir} |
84 | https://code.crute.me/$user/$repo/tree{/dir}/{file}#n{line}"> | 84 | https://$host/$user/$repo/tree{/dir}/{file}#n{line}"> |
85 | </head></html>'; | 85 | </head></html>'; |
86 | } | 86 | } |
87 | 87 | ||