refactor Dockerfile to streamline build process and remove unnecessary dependencies
All checks were successful
Build and Push Container Image / build-and-push-and-deploy (push) Successful in 48s
All checks were successful
Build and Push Container Image / build-and-push-and-deploy (push) Successful in 48s
This commit is contained in:
1
main.go
1
main.go
@ -17,6 +17,7 @@ func main() {
|
|||||||
h.Use(func(ctx context.Context, c *app.RequestContext) {
|
h.Use(func(ctx context.Context, c *app.RequestContext) {
|
||||||
host := string(c.Host())
|
host := string(c.Host())
|
||||||
if strings.HasSuffix(host, OldDomain) {
|
if strings.HasSuffix(host, OldDomain) {
|
||||||
|
c.Header("X-Redirected-By", "liteyuki.org")
|
||||||
newHost := strings.TrimSuffix(host, OldDomain) + NewDomain
|
newHost := strings.TrimSuffix(host, OldDomain) + NewDomain
|
||||||
scheme := "https"
|
scheme := "https"
|
||||||
if proto := c.Request.Header.Get("X-Forwarded-Proto"); len(proto) > 0 {
|
if proto := c.Request.Header.Get("X-Forwarded-Proto"); len(proto) > 0 {
|
||||||
|
Reference in New Issue
Block a user