[GH-ISSUE #1454] All data is sent via OPTIONS when I use simple authentication on localhost #470

Closed
opened 2026-03-16 15:33:10 +03:00 by kerem · 4 comments
Owner

Originally created by @MassiveBox on GitHub (Jan 30, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1454

Describe the bug
When using Basic Auth on localhost, instead of using POST, GET, PUT, or any request type I set on Hoppscotch, my server receives a OPTIONS call.

To Reproduce
Steps to reproduce the behavior:

  1. Set as target URL a server running on LocalHost (idk if it's the same with external sites)
  2. Turn off proxy
  3. Open a server on localhost that listens for all requests
  4. Set authorization on simple auhorization, input random data
  5. Send request from hoppscotch
  6. See error on server logs

Expected behavior
If I set as method GET, I'm supposed to see GET in the server logs. I've tried with ARC, and it works, so it's not a server-side problem.

Screenshots
Error

Desktop (please complete the following information):

  • OS: Rolling Arch
  • Browser: Chromium (ungoogled)
  • Version: 87.0.4280.88 (Official Build) Arch Linux (64-bit)
Originally created by @MassiveBox on GitHub (Jan 30, 2021). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1454 **Describe the bug** When using Basic Auth on localhost, instead of using POST, GET, PUT, or any request type I set on Hoppscotch, my server receives a OPTIONS call. **To Reproduce** Steps to reproduce the behavior: 1. Set as target URL a server running on LocalHost (idk if it's the same with external sites) 2. Turn off proxy 3. Open a server on localhost that listens for all requests 4. Set authorization on simple auhorization, input random data 5. Send request from hoppscotch 6. See error on server logs **Expected behavior** If I set as method GET, I'm supposed to see GET in the server logs. I've tried with ARC, and it works, so it's not a server-side problem. **Screenshots** ![Error](https://telegra.ph/file/489958479ee06874798c7.png) **Desktop (please complete the following information):** - OS: Rolling Arch - Browser: Chromium (ungoogled) - Version: 87.0.4280.88 (Official Build) Arch Linux (64-bit)
kerem 2026-03-16 15:33:10 +03:00
Author
Owner
<!-- gh-comment-id:770245079 --> @liyasthomas commented on GitHub (Jan 30, 2021): This looks like a pre-flight request scenario. Refer: - [Dev.to - Why is my browser sending an OPTIONS HTTP request instead of POST?](https://dev.to/p0oker/why-is-my-browser-sending-an-options-http-request-instead-of-post-5621) - [stack overflow - Why does the browser send an OPTIONS request even though my frontend code is just making a POST request?](https://stackoverflow.com/questions/46904400/why-does-the-browser-send-an-options-request-even-though-my-frontend-code-is-jus) - [stack overflow - Why is an OPTIONS request sent and can I disable it?](https://stackoverflow.com/questions/29954037/why-is-an-options-request-sent-and-can-i-disable-it)
Author
Owner

@liyasthomas commented on GitHub (Jan 31, 2021):

Feel free to re-open this issue if it's not a pre-flight request.

<!-- gh-comment-id:770316241 --> @liyasthomas commented on GitHub (Jan 31, 2021): Feel free to re-open this issue if it's not a pre-flight request.
Author
Owner

@lostpebble commented on GitHub (Feb 17, 2021):

I'm getting the same, just want to make a simple GET request to my localhost server- but Hoppscotch always sends an OPTIONS request instead. Is there no way to prevent the OPTIONS request?

Edit: Nevermind, I see there is a GET request getting sent first- which errors because of CORS. Then the OPTIONS request is made.

<!-- gh-comment-id:780553448 --> @lostpebble commented on GitHub (Feb 17, 2021): I'm getting the same, just want to make a simple GET request to my localhost server- but Hoppscotch always sends an OPTIONS request instead. Is there no way to prevent the OPTIONS request? Edit: Nevermind, I see there is a GET request getting sent first- which errors because of CORS. Then the OPTIONS request is made.
Author
Owner

@liyasthomas commented on GitHub (Feb 17, 2021):

Yeah, that's a pre-flight request.
https://github.com/hoppscotch/hoppscotch/issues/1454#issuecomment-770245079

<!-- gh-comment-id:780556055 --> @liyasthomas commented on GitHub (Feb 17, 2021): Yeah, that's a pre-flight request. https://github.com/hoppscotch/hoppscotch/issues/1454#issuecomment-770245079
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#470
No description provided.