Apinizer Possible Issues and Solutions
GetCapabilities Routing Issue in Geographic Information Systems Services
Problem
Addresses in the WSDL returned with GetCapabilities in Geographic Information Systems services need to be moved to Apinizer.
Solution
With a Business Rule or Script policy to be added to section 2, if the value 'GetCapabilities' comes in the 'request' key as a query param in the url, the address here should be changed with string replace to route to the relevant proxy in Apinizer.
Client IP Address Appearing as 10.244.x.x
Problem
Client IP address appears as 10.244.x.x in Kubernetes environment.
Reason/Why
In Kubernetes NodePort structure, if X-Forwarded-For value does not come from client, it routes the pod's IP address to the application behind by default. As a solution, we can solve it by making the externalTrafficPolicy value Local, but this time since NodePort does not route incoming requests to other servers in the Cluster, access problems occur. It is necessary to know the relevant Node and go to it.
Solution
Since Apinizer Workers will be placed behind a structure like Nginx or F5, xff information needs to be added to the header in the relevant loadbalancer's configuration file as follows.
This setting can be made for Nginx as follows:
location /apigateway/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://api.inst.com/apigateway/;
} # end location
Headers Containing Underscores Not Appearing in API Traffic Logs
Problem
Headers containing underscores not appearing/being transferred in API Traffic Logs.
Reason/Why
While this issue is not related to Apinizer, it is related to the default settings of Nginx, which may be used in front of Apinizer.
Nginx is widely used as a web server and reverse proxy server. However, in Nginx's default configuration, HTTP headers containing underscore (_) characters in their names are not processed and passed. This is because underscores are not standard in HTTP RFC.
Solution
To solve this problem, you should set the underscores_in_headers directive to on in the Nginx configuration file. This ensures Nginx processes headers containing underscores correctly.
vi /etc/nginx/nginx.conf
http {
underscores_in_headers on;
}
For Ingress Nginx:
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-configuration
namespace: ingress-nginx
labels:
app: ingress-nginx
data:
enable-underscores-in-headers: "true"
Turkish Characters Being Transferred Corrupted
Problem
Turkish characters are being transferred corrupted.
Reason/Why
Character set information should be set to Content-Type header during data transmission from client side.