Back to Question Center
0

mod_proxy (_html) da buggy Semalt (ba da rubutu / html don bayanai na JSON)

1 answers:

Mun sami Webserver da ke amsa tambayoyin AJAX ta aika JSON Data zuwa ga abokin ciniki. Matsalar ita ce JSON Data yana da nau'in nau'in "rubutu / html" a maimakon "aikace-aikacen / json" (yana da Semem APEX Server, bug yana yarda da Semalt amma ba za su gyara shi ba).

Tsakanin abokan ciniki da uwar garke ne Apache Webserver da aka saita a matsayin SSL-wakili. Wannan wakili zai duba kowane "rubutu / html" Bayanin da aka watsa daga Server zuwa ga abokin ciniki, sake rubuta saƙo idan ya cancanta, kuma, da rashin alheri, zai gyara "malformed" html bayanai - forgot tax file number. Tun da JSON Data da aka aika daga uwar garke an lakafta shi azaman rubutu / html, waɗannan haɗin html ana amfani da su a JSON Data ( . Za a kara alamun misali misali), wanda ya sa ba shi da amfani da abokin ciniki mai tambaya (parse kurakurai).

Abin da na yi kokarin har yanzu

  • / apex / wwv_flow. nunawa shine aikin da ke kawo JSON Data. Ina so a baje shi ba tare da sake sake rubutawa ba, yayin da sauran / jinsin / ya kamata a kasance "hanya na al'ada".
  • Na kara da cewa "Saiti ya kafa X-Rule- "kawai don gano abin da Dokar ana amfani.
      ProxyPass http: // 192. 168. 1. 100: 8080 / apex / wwv_flow. nunaAn saita mažallin "X-Rule-apex-wwv_flow. nuna "" 1 "Rubutun saiti Abinda ke ciki-Type "aikace-aikacen / json"  ProxyPass http: // 192. 168. 1. 100: 8080 / apex /Rubutun sa "X-Rule-apex" "1"Adireshin yana sanya Cache-Control a kowane lokaci "ba-cache, ba-store, max-age = 0, dole ne sake komawa" env = nocacheSetOutputFilter INFLATE, wakili-html;ProxyPassReverse / apex /ProxyHTMLURLMap / / apex /ProxyHTMLURLMap / apex / apexProxyHTMLURLMap / apex / / apex /ProxyHTMLDocType ''    

A sakamakon haka na sami JSON Data yanzu an kira shi "aikace-aikacen / json", amma har da HTML-Filtered tare da " "tags. Bugu da kari duka "X-Rule . " Rubutun ("Rukunin X-Rule" da "X-Rule-apex-wwv_flow. nuna ") an saita su a cikin Jirgin Data Riga wanda ke nufin cewa duka Ana amfani da dokoki.

  • Shin akwai wata hanyar da za a gaya wa mod_proxy kawai don amfani idan ya dace sannan kuma ya dakatar?
  • Shin zai yiwu a dakatar da gyaran bayanan "malformed" html (a duniya)? Ban sami wani abu ba.
  • Zai yiwu a gaya don dakatar da aiki idan url ya ƙunshi "wwv_flow. nuna "? Ba a sami wani abu ba.
  • Ko kuma akwai wani zaɓi wanda ba zan iya tunani ba don warware matsalar?
February 13, 2018