apiVersion: v1
kind: ConfigMap
metadata:
  name: caddy-config
  namespace: default
data:
  Caddyfile: |
    learn.hasura.io 35.239.102.165:80 {
      tls {
        dns cloudflare
      }
      redir 301 {
        /learn/database/postgresql/ /learn/database/postgresql/introduction
      }

      redir 301 {
        /learn/database/mysql/ /learn/database/mysql/introduction
      }

      redir 301 {
        /learn/database/microsoft-sql-server/ /learn/database/microsoft-sql-server/introduction
      }

      redir 301 {
        /learn/graphql/react-rxdb-offline-first/ /learn/graphql/react-rxdb-offline-first/introduction
      }

      redir 301 {
        /learn/graphql/typescript-react-apollo/ /learn/graphql/typescript-react-apollo/introduction
      }

      redir 301 {
        /learn/graphql/angular-apollo/ /learn/graphql/angular-apollo/introduction
      }

      redir 301 {
        /learn/graphql/flutter-graphql/ /learn/graphql/flutter-graphql/introduction
      }

      redir 301 {
        /learn/graphql/reason-react-apollo/ /learn/graphql/reason-react-apollo/introduction
      }

      redir 301 {
        /learn/graphql/rescript-react-apollo/ /learn/graphql/rescript-react-apollo/introduction
      }

      redir 301 {
        /learn/graphql/svelte-apollo/ /learn/graphql/svelte-apollo/introduction
      }

      redir 301 {
        /learn/graphql/elm-graphql/ /learn/graphql/elm-graphql/introduction
      }

      redir 301 {
        /learn/graphql/react-native/ /learn/graphql/react-native/introduction
      }

      redir 301 {
        /learn/graphql/react-apollo-components/ /learn/graphql/react-apollo-components/introduction
      }

      redir 301 {
        /learn/graphql/react/ /learn/graphql/react/introduction
      }

      redir 301 {
        /learn/graphql/vue/ /learn/graphql/vue/introduction
      }

      redir 301 {
        /learn/graphql/ios/ /learn/graphql/ios/introduction
      }

      redir 301 {
        /learn/graphql/android/ /learn/graphql/android/introduction
      }

      redir 301 {
        /learn/graphql/hasura-auth-slack/ /learn/graphql/hasura-auth-slack/introduction
      }

      redir 301 {
        /learn/graphql/hasura-advanced/ /learn/graphql/hasura-advanced/introduction
      }

      redir 301 {
        /learn/graphql/hasura/ /learn/graphql/hasura/introduction
      }

      redir 301 {
        /learn/graphql/intro-graphql/ /learn/graphql/intro-graphql/introduction
      }

      redir 301 {
        /learn/graphql/unity/ /learn/graphql/unity/introduction
      }

      redir 301 {
        /learn/graphql/nextjs-fullstack-serverless/ /learn/graphql/nextjs-fullstack-serverless/introduction
      }

      redir 301 {
        /learn/graphql/remix-fullstack-firebase/ /learn/graphql/remix-fullstack-firebase/introduction
      }

      redir 301 {
        /learn/ja/graphql/hasura/ /learn/ja/graphql/hasura/introduction
      }

      redir 301 {
        /learn/ja/graphql/hasura-auth-slack/ /learn/ja/graphql/hasura-auth-slack/introduction
      }

      redir 301 {
        /learn/ja/graphql/hasura-advanced/ /learn/ja/graphql/hasura-advanced/introduction
      }

      redir 301 {
        /learn/ja/graphql/intro-graphql/ /learn/ja/graphql/intro-graphql/introduction
      }

      redir 301 {
        /learn/ja/graphql/react-apollo-hooks/ /learn/ja/graphql/react-apollo-hooks/introduction
      }

      redir 301 {
        /learn/zh/graphql/hasura/ /learn/zh/graphql/hasura/introduction
      }

      redir 301 {
        /learn/zh/graphql/intro-graphql/ /learn/zh/graphql/intro-graphql/introduction
      }

      proxy /learn/auth/webhook auth-webhook {
        without /learn/auth
      }

      proxy /learn/auth auth-jwt-server {
        without /learn/auth
      }

      proxy /learn/graphql/console hasura/console {
        without /learn/graphql/console
      }

      proxy /learn/graphql/v1alpha1/graphql hasura/v1alpha1/graphql {
        without /learn/graphql/v1alpha1/graphql
        websocket
      }

      proxy /learn/graphql/v1/graphql hasura/v1/graphql {
        without /learn/graphql/v1/graphql
        websocket
      }

      proxy /learn/graphql/v1/query hasura/v1/query {
        without /learn/graphql/v1/query
      }

      proxy /learn/graphql/v1/version hasura/v1/version {
        without /learn/graphql/v1/version
      }

      proxy /learn/graphql/graphiql graphiql {
        without /learn/graphql/graphiql
      }

      proxy /learn/database/postgresql database-postgresql

      proxy /learn/database/mysql database-mysql

      proxy /learn/database/microsoft-sql-server database-mssql

      proxy /learn/graphql/hasura-auth-slack hasura-auth-slack

      proxy /learn/graphql/hasura-advanced hasura-advanced

      proxy /learn/graphql/hasura hasura-backend

      proxy /learn/graphql/react-rxdb-offline-first react-rxdb

      proxy /learn/graphql/typescript-react-apollo typescript-react-apollo

      proxy /learn/graphql/react-native react-native-apollo

      proxy /learn/graphql/react-apollo-components react-apollo

      proxy /learn/graphql/react react-apollo-hooks

      proxy /learn/graphql/remix-fullstack-firebase remix-fullstack-firebase

      proxy /learn/graphql/vue vue-apollo

      proxy /learn/graphql/ios ios-apollo

      proxy /learn/graphql/android android-apollo

      proxy /learn/graphql/elm-graphql elm-graphql

      proxy /learn/graphql/reason-react-apollo reason-react-apollo

      proxy /learn/graphql/rescript-react-apollo rescript-react-apollo

      proxy /learn/graphql/svelte-apollo svelte-apollo

      proxy /learn/graphql/angular-apollo angular-apollo

      proxy /learn/graphql/flutter-graphql flutter-graphql

      proxy /learn/graphql/intro-graphql intro-graphql

      proxy /learn/graphql/unity unity

      proxy /learn/graphql/nextjs-fullstack-serverless nextjs-fullstack-serverless

      proxy /learn/ja/graphql/hasura hasura-backend-ja

      proxy /learn/ja/graphql/hasura-auth-slack hasura-auth-slack-ja

      proxy /learn/ja/graphql/hasura-advanced hasura-advanced-ja

      proxy /learn/ja/graphql/intro-graphql intro-graphql-ja

      proxy /learn/ja/graphql/react-apollo-hooks react-apollo-hooks-ja

      proxy /learn/zh/graphql/hasura hasura-backend-zh

      proxy /learn/zh/graphql/intro-graphql intro-graphql-zh

      proxy /learn/graphql hasura/v1/graphql {
        without /learn/graphql
        websocket
      }
    }
