Nginx に CORS 用の設定をする。普通にコレで行けるね。
server {
listen 80;
server_name hoge.example.com;
location / {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods "POST, GET, OPTIONS";
add_header Access-Control-Allow-Headers "Origin, Authorization, Accept";
add_header Access-Control-Allow-Credentials true;
proxy_pass http://localhost:8888;
}
}