hoppscotch / proxyscotch

📡 A simple proxy server created for https://hoppscotch.io
https://hoppscotch.io
MIT License
360 stars 93 forks source link

JSON Responses becomes stringified whenever it passes proxywoman #18

Closed asomethings closed 4 years ago

asomethings commented 4 years ago

Json responses from orig servers becomes stringified json whenever it comes through proxywoman. The part that i can't understand that is https://postwoman.apollosoftware.xyz/ proxy works fine and it gets data by json.

Is there any chance that i could be missing something?

I've tested with both same link which is https://projects.propublica.org/nonprofits/api/v2/search.json?order=revenue&sort_order=desc

How to reproduce (Tested with Linux / Windows / Docker(Linux))

  1. Start Linux/Windows Proxywoman server.
  2. Request https://projects.propublica.org/nonprofits/api/v2/search.json?order=revenue&sort_order=desc
  3. Check response from proxy server

Sample response (Truncated organizations) from my local proxywoman

{
  "success": true,
  "data": "{\"total_results\":1968539,\"organizations\":[{\"ein\":464744976,\"strein\":\"46-4744976\",\"name\":\"0 DEBT EDUCATION INC\",\"sub_name\":\"0 DEBT EDUCATION INC\",\"city\":\"SANTA ROSA\",\"state\":\"CA\",\"ntee_code\":\"P51\",\"raw_ntee_code\":\"P51\",\"subseccd\":3,\"has_subseccd\":true,\"have_filings\":true,\"have_extracts\":true,\"have_pdfs\":true,\"score\":1.0}],\"num_pages\":100,\"cur_page\":0,\"page_offset\":0,\"per_page\":100,\"search_query\":null,\"selected_state\":null,\"selected_ntee\":null,\"selected_code\":null,\"data_source\":\"ProPublica Nonprofit Explorer API: https://projects.propublica.org/nonprofits/api/\\nIRS Exempt Organizations Business Master File Extract (EO BMF): https://www.irs.gov/charities-non-profits/exempt-organizations-business-master-file-extract-eo-bmf\\nIRS Annual Extract of Tax-Exempt Organization Financial Data: https://www.irs.gov/uac/soi-tax-stats-annual-extract-of-tax-exempt-organization-financial-data\",\"api_version\":2}",
  "status": 200,
  "statusText": "OK",
  "headers": {
    "Age": "5394",
    "Alt-Svc": "h3-27=\":443\"; ma=86400, h3-28=\":443\"; ma=86400, h3-29=\":443\"; ma=86400",
    "Cache-Control": "public, max-age=86400, s-maxage=31536000, stale-while-revalidate=600, stale-if-error=600",
    "Cf-Cache-Status": "HIT",
    "Cf-Ray": "5af22d0e9e6ee9f0-ICN",
    "Cf-Request-Id": "03cb3a7d1c0000e9f0208e3200000001",
    "Content-Type": "application/json; charset=utf-8",
    "Date": "Tue, 07 Jul 2020 14:15:09 GMT",
    "Etag": "W/\"38320e44c0b00757dc75821be0287618\"",
    "Expect-Ct": "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
    "Server": "cloudflare",
    "Set-Cookie": "__cfduid=dd646369072c7864ab415e4b3240333cb1594131309; expires=Thu, 06-Aug-20 14:15:09 GMT; path=/; domain=.propublica.org; HttpOnly; SameSite=Lax",
    "Vary": "Accept,Accept-Encoding,Content-Type",
    "X-Content-Type-Options": "nosniff",
    "X-Frame-Options": "SAMEORIGIN",
    "X-Request-Id": "b2fe267c-ab18-489b-88bf-b4f6c90dd9b3",
    "X-Runtime": "0.139345",
    "X-Xss-Protection": "1; mode=block"
  }
}