HandlerInterceptorAdapterで認証をfirebaseで入れていた
クライアントサイドからのリクエストが延々とcorsエラー
止まらないエラー。
「Access to fetch at 'http://localhost:8080/article/1/edit/fileupload' from origin 'http://localhost:3001' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
」
cors対応はクライアントサイド、サーバサイドともにできている
クライアントサイド
fetchには、Requestに'cors'
を設定できている。
サーバサイド
Spring Bootで、@CrosOrigin
つけている。
原因
HandlerInterceptorAdapterのpreHandle内で、
response.status = 200
などのステータスコードを設定していなかった。
根本原因は不明だが。。。