<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ### http access module[](http://tengine.taobao.org/book/chapter_03.html#http-access-module "永久鏈接至標題") 該模塊的代碼位于src/http/modules/ngx_http_access_module.c中。該模塊的作用是提供對于特定host的客戶端的訪問控制。可以限定特定host的客戶端對于服務端全部,或者某個server,或者是某個location的訪問。 該模塊的實現非常簡單,總共也就只有幾個函數。 [](http:// "點擊提交Issue,反饋你的意見...") static ngx_int_t ngx_http_access_handler(ngx_http_request_t *r); static ngx_int_t ngx_http_access_inet(ngx_http_request_t *r, ngx_http_access_loc_conf_t *alcf, in_addr_t addr); #if (NGX_HAVE_INET6) static ngx_int_t ngx_http_access_inet6(ngx_http_request_t *r, ngx_http_access_loc_conf_t *alcf, u_char *p); #endif static ngx_int_t ngx_http_access_found(ngx_http_request_t *r, ngx_uint_t deny); static char *ngx_http_access_rule(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); static void *ngx_http_access_create_loc_conf(ngx_conf_t *cf); static char *ngx_http_access_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child); static ngx_int_t ngx_http_access_init(ngx_conf_t *cf); 對于與配置相關的幾個函數都不需要做解釋了,需要提一下的是函數ngx_http_access_init,該函數在實現上把本模塊掛載到了NGX_HTTP_ACCESS_PHASE階段的handler上,從而使自己的被調用時機發生在了NGX_HTTP_CONTENT_PHASE等階段前。因為進行客戶端地址的限制檢查,根本不需要等到這么后面。 另外看一下這個模塊的主處理函數ngx_http_access_handler。這個函數的邏輯也非常簡單,主要是根據客戶端地址的類型,來分別選擇ipv4類型的處理函數ngx_http_access_inet還是ipv6類型的處理函數ngx_http_access_inet6。 而這個兩個處理函數內部也非常簡單,就是循環檢查每個規則,檢查是否有匹配的規則,如果有就返回匹配的結果,如果都沒有匹配,就默認拒絕。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看