Skip to content

[Bug] Creating a static website fails when primaryDomain is empty #13710

Description

@Dearanlan

Environment

  • 1Panel version: v2.2.5
  • Release channel: stable
  • OS: Debian GNU/Linux 13 x86
  • Docker: 29.7.2

Description

Creating a static website from the 1Panel Websites page fails.

The request contains an empty primaryDomain and empty siteDir, while the
domains array contains the actual domain.

Steps to reproduce

  1. Open 1Panel Websites.
  2. Create a static website.
  3. Set the domain to tesat.cn.
  4. Submit the form.

The frontend sends a request to POST /api/v2/websites with this sanitized
payload:

{
  "primaryDomain": "",
  "type": "static",
  "alias": "qwer",
  "domains": [
    {
      "domain": "tesat.cn",
      "host": "tesat.cn",
      "port": 80,
      "ssl": false
    }
  ],
  "siteDir": "",
  "enableSSL": false
}

Expected behavior

The static website should be created successfully, or the UI should show a
clear validation message identifying the missing required field.

Actual behavior

Website creation fails.

HTTP response status and response body were not captured from the frontend
request.

Additional information

Session cookies and CSRF tokens are intentionally omitted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions