groonga-httpdをjsonで他のサーバーから呼び出し結果を使う場合にはヘッダーにAccess-Control-Allow-Originを追加しないといけません。
add_headerにて追加します。
/etc/groonga/httpd/groonga-httpd.conf
server {
listen 10041;
server_name localhost;
location /d/ {
groonga on;
# You can disable log for groonga.
# groonga_log_path off;
# You can disable query log for groonga.
# groonga_query_log_path off;
# You can custom database path.
# groonga_database /path/to/groonga/db;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
}
....
以下のコマンドで再起動します。
/etc/init.d/groonga-httpd restart