405 Error on Authentication

Hello Everyone, i have an issue with registering users. I keep getting a 405 error.
I have adjusted my CORS settings, but its still the same error. Any idea what is happening?

Below is my sign up logic.

     export async function signupUser(dispatch, signupPayload) {
      const requestOptions = {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(signupPayload),
      try {
        dispatch({ type: 'REQUEST_SIGNUP' });
        let response = await fetch(`${process.env.REACT_APP_ROOT_URL}/auth/local/register`, requestOptions);
        console.log(response, 'kkkk');
        let data = await response.json();
        if (data.user) {
          dispatch({ type: 'SIGNUP_SUCCESS', payload: data });
          localStorage.setItem('currentUser', JSON.stringify(data.jwt));
          return data
        dispatch({ type: 'SIGUNP_ERROR', error: data.errors[0] });
      } catch (error) {
        dispatch({ type: 'SIGNUP_ERROR', error: error });