we've got a Webserver that answers to AJAX requests by sending JSON Data to the client. Problem is that the JSON Data has the content-type "text/html" instead of "application/json" (FYI its an Oracle APEX Server, the bug is aknowledged by Oracle but they wont fix it).
Between the clients and the server is an Apache Webserver configured as a SSL-Proxy.
That Proxy will now scan every "text/html" Data transmitted from the Server to the client, rewrite links if nessesary and, unfortunately, will also fix "malformed" html data. since the JSON Data sent from the server is labeled as text/html, those html fixes are also applied to the JSON Data (<html><body>.. tags will be added for example), which renders it unusable by the requesting client (parse errors).
what i tried up to now
- /apex/wwv_flow.show is the function delivering JSON Data. I'd like that to be proxied without any rewriting, while the rest of /apex/ should be proxied "the normal way".
- i'e added "Header set X-Rule-..." just to trace which <Location> Rule is applied
- Code: Select all
Header set "X-Rule-apex-wwv_flow.show" "1"
Header set Content-Type "application/json"
Header set "X-Rule-apex" "1"
Header always set Cache-Control "no-cache, no-store, max-age=0, must-revalidate" env=nocache
RequestHeader unset Accept-Encoding
ProxyHTMLURLMap / /apex/
ProxyHTMLURLMap /apex /apex
ProxyHTMLURLMap /apex/ /apex/
ProxyHTMLDocType '<!DOCTYPE html>'
As a result i get the JSON Data now labeled as "application/json", but also HTML-Filtered with the "<html><body>..." tags.
In addition both "X-Rule…" Headers ("X-Rule-apex" and "X-Rule-apex-wwv_flow.show") are set in the arriving Data Package
which means that both <Location> Rules were applied.
- Is there any way to tell mod_proxy only to apply <Location "/apex/wwv_flow.show"> if it fits and then stop?
- is it possible to deactivate the fixing of "malformed" html data (globally)? didnt find anything :/
- Is i possible to tell <Location /apex/> to stop procesing if the url contains "wwv_flow.show"? also didnt find anyhing.
- Or is there any other option i cant think of to solve the problem?