• @guqing guqing commented on issue #6255 in halo-dev/halo

    希望增加X-Forwarded-Proto和X-Forwarded-Host,通过雷池代理的网站是通过这俩请求头传递上游IP的

    Hi @52lemon6 , 看看能否通过配置的方式解决 https://waf-ce.chaitin.cn/docs/faq/other ,一般来说 X-Forwarded-For 和 X-Real-IP 才是最常用的

    0 0
  • @guqing guqing created a review on pull request #6334 in halo-dev/halo

    /lgtm

    0 0
  • @guqing guqing commented on issue #6359 in halo-dev/halo

    你可以写一个插件来做这件事,目前 Halo 没有计划添加这样的功能

    0 0
  • @guqing guqing pushed to feature/api-client in halo-sigs/halo-gradle-plugin

    Below is the list of commits:

    • feat: add tasks for OpenAPI docs and api-client code generation (a0cd1b0)
    0 0
  • @guqing guqing pushed to feature/api-client in halo-sigs/halo-gradle-plugin

    Below is the list of commits:

    • feat: add tasks for OpenAPI docs and api-client code generation (12952df)
    0 0
  • @guqing guqing opened pull request #16 in halo-sigs/halo-gradle-plugin

    What this PR does?

    实现了两个 tasks,用于为插件项目生成 OpenAPI docs 和 API Client

    • generateOpenApiDocs: 启动一个 Halo 作为 API Docs Server 并根据用户配置的 groupedApiMappings 来下载 Open API 的 json 文件到指定目录
    • generateApiClient 根据 groupedApiMappings 指定的文件名称和其他配置来生成 API Client 到前端模块的项目中

    使用方式:
    在 build.gradle 中配置

    haloPlugin {
        openApi {
            outputDir = file("$rootDir/api-docs/openapi/v3_0")
            groupedApiMappings = [
                    '/v3/api-docs/apis_aggregated.api_v1alpha1': 'aggregated.json'
            ]
            generator {
                // 默认配置可缺省
                outputDir = file("${projectDir}/console/src/api/generated")
                // 默认配置可缺省
                additionalProperties = [
                        useES6: true,
                        useSingleRequestParameter: true,
                        withSeparateModelsAndApi: true,
                        apiPackage: "api",
                        modelPackage: "models"
                ]
                // 默认配置可缺省
                typeMappings = [
                        set: "Array"
                ]
            }
        }
    }
    0 0
  • @guqing guqing pushed to feature/api-client in halo-sigs/halo-gradle-plugin

    Below is the list of commits:

    • feat: add tasks for OpenAPI docs and api-client code generation (637bcdd)
    0 0
  • @guqing guqing opened pull request #15 in halo-sigs/halo-gradle-plugin

    What this PR does?

    支持访问到 swagger-ui 页面

    None
    
    0 0
  • @guqing guqing created branch feature/swagger-ui in halo-sigs/halo-gradle-plugin

    halo-sigs/halo-gradle-plugin

    This is a Gradle plugin for building Halo plugins, written in Java.

    0 0
  • @guqing guqing created branch feature/api-client in halo-sigs/halo-gradle-plugin

    halo-sigs/halo-gradle-plugin

    This is a Gradle plugin for building Halo plugins, written in Java.

    0 0