Skip to content

Gitlab `-/mergre_requests/xxxx` 页面 调用 GraphQL 过于频繁

极狐 Gitlab SaaS平台 猿辅导客户这边有高频请求/api/graphql 的情况,目前触发了防火墙拦截策略,导致IP被block了。

日志信息信息显示 24 小时内 访问数量达6万多次。

image

其中一条日志信息

{
"ipinfo_province":"北京"
"schema":"http"
"referer":"https://jihulab.com/yuanli/wukong/-/merge_requests/9182"
"instance":"waf_2kuheozi0295h10r"
"ipinfo_state":"CN"
"ipinfo_city":"北京"
"edition":"clb-waf"
"ipinfo_dimensionality":"39.93157"
"language":"en-US,en;q=0.9"
"uuid":"f00e03acd4d1e1cc9929c603dbc8ae95-5bf177080ded24d6a548e6c82b74bdf4"
"upstream_status":"0"
"request_time":"0.006"
"content_type":"application/json"
"host":"jihulab.com"
"client":"49.7.19.196"
"connection":"close"
"ipinfo_nation":"中国"
"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15"
"headers":"accept-language: en-US,en;q=0.9
accept-encoding: gzip, deflate, br
accept: */*
stgw_request_id: ceffb4f249d3ddd6f41553a2fd7605d8
x-gitlab-feature-category: code_review_workflow
stgw-orgservername: jihulab.com
stgw-orgreq: POST /api/graphql HTTP/2.0
connection: close
x-waf-uuid: f00e03acd4d1e1cc9929c603dbc8ae95-5bf177080ded24d6a548e6c82b74bdf4
origin: https://jihulab.com
x-csrf-token: V0LKiabKH17riUPTF5kVyErzA/Wsa4G8zt8DDVU0zTyWkfWGCJt2CfPl8/vznmvf8OuWfGOQ0BjTgu8pI9CtQA==
content-length: 1307"
"upstream":""
"cookie":"ph_phc_3VHEsulQRnz4Dzj816hk02haRuEvn3RKIDAvPeQYhP5_posthog=%7B%22distinct_id%22%3A6066%2C%22%24device_id%22%3A%2218529ddd5bfec4-0e1a63ade88229-3c626b4b-16a7f0-18529ddd5c026b0%22%2C%22%24initial_referrer%22%3A%22%24direct%22%2C%22%24initial_referring_domain%22%3A%22%24direct%22%2C%22%24referrer%22%3A%22https%3A%2F%2Fjihulab.com%2Fyuanli%2Fwukong%2F-%2Fmerge_requests%2F9192%22%2C%22%24referring_domain%22%3A%22jihulab.com%22%2C%22%24sesid%22%3A%5B1678106699069%2C%22186b6e5d511396-0fa4007f16f5158-3d626b4b-384000-186b6e5d5121b3c%22%5D%2C%22%24session_recording_enabled_server_side%22%3Afalse%2C%22%24user_id%22%3A6066%2C%22%24active_feature_flags%22%3A%5B%5D%2C%22%24enabled_feature_flags%22%3A%7B%7D%7D; sidebar_collapsed=true; _gitlab_session=5924216c0dab8dbdc2c31e733e1a69ad; remember_user_token=eyJfcmFpbHMiOnsibWVzc2FnZSI6IlcxczJNRFkyWFN3aUpESmhKREV3SkdoMVMyZHFlVGszYm5kR1FuRkZRMDF1ZHpCWlpIVWlMQ0l4TmpjNE1EazNPVE16TGpRMk16TXdPRGdpWFE9PSIsImV4cCI6IjIwMjMtMDMtMjBUMTA6MTg6NTMuNDYzWiIsInB1ciI6ImNvb2tpZS5yZW1lbWJlcl91c2Vy"
"method":"POST"
"query":""
"ipinfo_detail":""
"encoding":"gzip, deflate, br"
"ipinfo_isp":"chinatelecom.com.cn"
"bytes_sent":"112"
"url":"/api/graphql"
"accept":"*/*"
"x_forwarded_for":""
"upstream_connect_time":"0.000"
"request_length":"3725"
"appid":"1303695223"
"domain":"jihulab.com"
"msec":"1678106769673"
"upstream_response_time":"0.000"
"time":"06/Mar/2023:20:46:09 +0800"
"ipinfo_longitude":"116.41005"
"status":"600"
}

是否可以减少 -/mergre_requests/xxxx` 页面 调用 GraphQL 的频率

胡睿智 编辑于