[PR #593] fix: accept plugin_unique_identifier from query params for DecodePluginFromIdentifier #600

Open
opened 2026-02-16 01:16:29 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/593
Author: @minodisk
Created: 1/28/2026
Status: 🔄 Open

Base: mainHead: fix/decode-plugin-from-identifier-use-query-params


📝 Commits (1)

  • 0ba62fe fix: accept plugin_unique_identifier from query params for DecodePluginFromIdentifier

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 internal/server/controllers/plugins.go (+1 -1)

📄 Description

Summary

  • Changed struct tag from json:"plugin_unique_identifier" to form:"plugin_unique_identifier" for DecodePluginFromIdentifier handler

Problem

The DecodePluginFromIdentifier endpoint was expecting plugin_unique_identifier in the JSON request body. However, this is a GET endpoint, and sending a body with GET requests causes issues with HTTP intermediaries like Google Cloud Run's frontend, which rejects such requests as malformed.

Solution

Changed from json: tag to form: tag, which binds the parameter from query string instead of JSON body. This is:

  • Consistent with similar GET endpoints (FetchPluginManifest, FetchPluginFromIdentifier) which already use form: tags
  • Compliant with HTTP standards (GET requests should not have semantic body content)
  • Compatible with Cloud Run and other HTTP proxies/load balancers

Related PR

This change requires a corresponding change in dify:


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/593 **Author:** [@minodisk](https://github.com/minodisk) **Created:** 1/28/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/decode-plugin-from-identifier-use-query-params` --- ### 📝 Commits (1) - [`0ba62fe`](https://github.com/langgenius/dify-plugin-daemon/commit/0ba62fe9ebe05c0ccf70d1390e2f7724c751a127) fix: accept plugin_unique_identifier from query params for DecodePluginFromIdentifier ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/server/controllers/plugins.go` (+1 -1) </details> ### 📄 Description ## Summary - Changed struct tag from `json:"plugin_unique_identifier"` to `form:"plugin_unique_identifier"` for DecodePluginFromIdentifier handler ## Problem The `DecodePluginFromIdentifier` endpoint was expecting `plugin_unique_identifier` in the JSON request body. However, this is a GET endpoint, and sending a body with GET requests causes issues with HTTP intermediaries like **Google Cloud Run's frontend**, which rejects such requests as malformed. ## Solution Changed from `json:` tag to `form:` tag, which binds the parameter from query string instead of JSON body. This is: - Consistent with similar GET endpoints (`FetchPluginManifest`, `FetchPluginFromIdentifier`) which already use `form:` tags - Compliant with HTTP standards (GET requests should not have semantic body content) - Compatible with Cloud Run and other HTTP proxies/load balancers ## Related PR This change requires a corresponding change in dify: - https://github.com/langgenius/dify/pull/31697 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#600