Tux

  • 291 Posts
  • 1.11K Comments
Joined 2 years ago
cake
Cake day: June 20th, 2023

help-circle




  • For Cloudflare users:
    Security Rules:

    (http.request.uri.path eq "/api/v3/comment/list" and not http.request.uri.query contains "post_id")
    

    For Caddy users:

      # >>> Specific handler for /api/v3/comment/list with post_id check
      handle_path /api/v3/comment/list {
        # Check if the 'post_id' query parameter is present
        @hasPostId {
          query post_id=*
        }
        # Abort the connection if the parameter is missing
        handle @hasPostId {
          reverse_proxy http://localhost:8536/
        }
        # This handles all requests that did not match @hasPostId
        abort
      }