Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

malformed header: missing HTTP content-type #208

Open
2 tasks done
zuffik opened this issue Dec 13, 2024 · 1 comment
Open
2 tasks done

malformed header: missing HTTP content-type #208

zuffik opened this issue Dec 13, 2024 · 1 comment
Labels
bug Something isn't working resources

Comments

@zuffik
Copy link

zuffik commented Dec 13, 2024

Preflight Checklist

  • I could not find a solution in the documentation, the existing issues or discussions
  • I have joined the ZITADEL chat

Version

1.2.0

ZITADEL Version

2.66.0

Describe the problem caused by this bug

I'm facing an issue with terraform provider. Before creating an issue I was recommended to ask here:
so right now I'm using self-hosted docker solution, with simple setup

provider "zitadel" {
  domain           = "console.auth.${local.domain}"
  jwt_profile_json = var.zitadel_json_profile
}

resource "zitadel_org" "peripherals" {
  name = "peripherals"
}

I'm using json file to authenticate the user. The issue is that I keep receiving:
rpc error: code = Unknown desc = unexpected HTTP status code received from server: 464 (); malformed header: missing HTTP content-type

To reproduce

  1. Use self-hosted solution using docker + nginx as reverse proxy
  2. Use terraform configuration
  3. run terraform apply

Screenshots

Image

Expected behavior

I expect that resources will be created without an error.

Relevant Configuration

TF:

provider "zitadel" {
  domain           = "console.auth.${local.domain}"
  jwt_profile_json = var.zitadel_json_profile
}

resource "zitadel_org" "peripherals" {
  name = "peripherals"
}

docker compose:

  "zitadel":
    "command": "start-from-init --masterkeyFromEnv --tlsMode external --config /data/config"
    "container_name": "zuffik-common-infra-zitadel"
    "environment":
      "ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD": "****"
      "ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE": "disable"
      "ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME": "****"
      "ZITADEL_DATABASE_POSTGRES_DATABASE": "auth"
      "ZITADEL_DATABASE_POSTGRES_HOST": "postgres"
      "ZITADEL_DATABASE_POSTGRES_PORT": "5432"
      "ZITADEL_DATABASE_POSTGRES_USER_PASSWORD": "****"
      "ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE": "disable"
      "ZITADEL_DATABASE_POSTGRES_USER_USERNAME": "****"
      "ZITADEL_DOMAIN": "console.auth.zuffik.eu"
      "ZITADEL_EXTERNALSECURE": "false"
      "ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORD": "****"
      "ZITADEL_FIRSTINSTANCE_ORG_HUMAN_USERNAME": "root"
      "ZITADEL_MASTERKEY": "*****"
    "image": "ghcr.io/zitadel/zitadel:latest"
    "networks":
    - "zuffik_common_infra_network"
    "ports":
    - "0.0.0.0:9006:8080"
    "restart": "unless-stopped"

Additional Context

No response

@zuffik zuffik added the bug Something isn't working label Dec 13, 2024
@muhlemmer muhlemmer moved this to 🧐 Investigating in Product Management Dec 16, 2024
@zuffik
Copy link
Author

zuffik commented Jan 2, 2025

Upgraded to latest versions of everything, but the issue persists. I just realized that I didn't post my config.yaml and nginx config so I'm sending below. Maybe it will shed more light on the issue.

config.yaml

"ExternalDomain": "console.auth.zuffik.eu"
"ExternalPort": 443
"ExternalSecure": true

nginx config

server {
  listen 80;
  http2 on;
  server_name console.auth.${local.domain};
  access_log /var/log/nginx/${var.resource_id_prefix}-auth-console-access.log;
  error_log /var/log/nginx/${var.resource_id_prefix}-auth-console-error.log;
  client_max_body_size 100M;

  location / {
    proxy_pass http://zitadel:8080;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-Proto "https";
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header Connection "upgrade";
    proxy_set_header Upgrade $http_upgrade;

    grpc_pass grpc://zitadel:8080;
    grpc_set_header Host $host;
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resources
Projects
Status: 🧐 Investigating
Development

No branches or pull requests

2 participants