#405 Method Not Allowed

52 messages · Page 1 of 1 (latest)

mortal shuttle
#

Good evening, sorry to bother you again. I'm having a problem with Cors when I try to use in my axios client (frontend project in react with typescript) the internal URL of my backend service (helpcenter-backend.railway.internal) for some reason it keeps giving 405 Method Not Allowed but when I use the URL "web.helpcentercorp.com" within the axios configuration I don't have the same problem, I configured the origin within the backend to be the internal URL of my frontend (helpcenter-frontend.railway.internal) and even so it can't accept the request.

cerulean axleBOT
#

Project ID: f4cdcd7f-0c97-47cc-826e-9ffd1fd64620

mortal shuttle
#

f4cdcd7f-0c97-47cc-826e-9ffd1fd64620

round shell
#

Good evening, sorry to bother you again.
Good evening yourself, and you are never a bother!

is your frontend next? and are you making the requests on the server side?

mortal shuttle
#

This link I sent is for the frontend that makes requests to the backend in Java (I didn't quite understand the question)

#

I'm doing a new deployment to check a specific situation that might solve the problem

round shell
#

how do you know /api/auth/authenticate is the correct path?

mortal shuttle
#

Yes, the path is correct. I saw in the print that there is a concatenation of the URL + internal URL. Could that be it? Or is it the sending standard?

mortal shuttle
#

I'm sending a new backend deploy here

#

I want to configure this internal network system to avoid sending traffic to cloudflare from the frontend to the backend

round shell
#

your frontend is client side rendered, you need to use the public url

mortal shuttle
#

I understand, so in this case I really need to send all the traffic to Cloudflare, I'm going to add the public URL back into the system, do you know if there's any way to solve this? Or just rebuilding the project architecture?

#

something with SSR would have to be used to return the built components

round shell
#

why do you think you need cloudflare or the private url here?

mortal shuttle
#

I'm very layman so I'll try to explain the problem the way I'm seeing it, my request at the moment is taking a long time to complete while in a controlled environment (few resources) on a local network where I just point directly to the server within the same network the request takes much less time to complete, I tried to reduce the request delay as much as possible via code but now it's a network issue for me.

#

I am located in Brazil so I already imagined the latency but the person using the system is in Connecticut and has almost the same delay problem.

#

so I imagine that making the request directly on an internal URL would be faster than sending it to Cloudflare to resolve the DNS and then sending it to my backend

#

I really don't understand much about this part of the structure

round shell
#

i see where you are coming from, but i think the solution you are seeking out is not the correct path forward

#

so first off, get the 405 problem solved, dont worry about the private network or cloudflare

mortal shuttle
#

I went in this direction because when I configure my "origin" to accept requests from the registered cloudflare domain it doesn't give me this same problem and I was judging it as a Cors problem

round shell
#

well go ahead and get this working on the public network

mortal shuttle
#

This is my cors configuration within the backend, that "allowedOrigin" variable is receiving within the dev environment my frontend localhost + port and within railway it is using the cloudflare address https://helpcentercorp.com

#

I'll set it up again and let you know.

#

Now the system is working normally again, I configured it to access via external URL

#

with this external URL there is no 405 error or anything like that

#

an off-topic question, if any of my messages seem rude it is because of Google Translate, my English is very bad so I am using it to help me, I really appreciate all the effort put into helping me with these questions.

round shell
#

you don't seem rude but I appreciate you letting me know 🙂

round shell
mortal shuttle
#

One of the possible reasons is loading large files (blob)

#

I'm going to test a different implementation, but for the sake of knowledge, is there a way to create using the local URL? or something like that, in case I'm going down the wrong path, is keeping the public URL really the best option?

round shell
#

Unfortunately being very slow is not too helpful please provide real numbers

mortal shuttle
#

I apologize for the expression, but I ended up checking the values ​​sent within the payload and there were 16.0 MB transferred, so I went straight to another question.

round shell
mortal shuttle
#

Now I completely understand the issue (sorry for the delay), so I will have to maintain this structure and in fact localhost is a version of how it is used but within my ecosystem

round shell
mortal shuttle
#

and you may not believe me but I study computer science and yet I had these questions about how the internet works lol

mortal shuttle
round shell
#

that's okay, I didn't study anything

mortal shuttle
# round shell was this sending 16mb of data?

2 blob files were requested within the body, which are PDFs, so the request needed to send 16MB. I will cut these two pieces of information from the payload and create an additional endpoint.

#

I really appreciate your time and effort in helping me with all the related issues, I learned a lot about how this whole network thing works and it is knowledge that I will take with me for life, again thank you for everything!

mortal shuttle
#

I wish you a great night (here in Brazil it's 9pm) and thank you very much again!

round shell
#

you as well!

round shell
#

!s