bzp2010 commented on code in PR #12526:
URL: https://github.com/apache/apisix/pull/12526#discussion_r2281341489


##########
apisix/admin/standalone.lua:
##########
@@ -286,15 +311,37 @@ local function get(ctx)
     if not resp then
         return core.response.exit(500, {error_msg = err})
     end
+
+    core.response.set_header(METADATA_LAST_MODIFIED, config and 
config[METADATA_LAST_MODIFIED])
+    core.response.set_header(METADATA_DIGEST, config and 
config[METADATA_DIGEST])
     return core.response.exit(200, resp)
 end
 
 
+local function head(ctx)
+    local config, err = get_config()
+    if not config then
+        if err ~= "not found" then
+            core.log.error("failed to get config from shared dict: ", err)
+            return core.response.exit(500, {
+                error_msg = "failed to get config from shared dict: " .. err
+            })
+        end

Review Comment:
   Only `not found` is skipped by this if, which is expected to exist, so it 
seems fine.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to