hnimminh / libresbc

An open source Session Border Controller 🌟 The SBC you dream about 🗽 LibreSBC will help you save thousands of dollars.
https://github.com/hnimminh/libresbc
MIT License
357 stars 80 forks source link

[Feature Request] API Requests #43

Closed Legomix13 closed 2 years ago

Legomix13 commented 2 years ago

Describe the bug I'm building a web interface to manage the config more visually (will be openly released once finished) but when I try to make a PUT request to the API so I can modify an object I get a CORS error because most of the common web browsers will send first an OPTIONS request to the server but this one is rejecting that request with the message: {"detail":"Method Not Allowed"} Is there an easy way to let these request go?

To Reproduce

Actual behavior The API server refuses the OPTIONS preflight request from the browser

Expected behavior The server should let pass the OPTIONS and handle CORS

hnimminh commented 2 years ago

@Legomix13 can you retry with master? I just put new code support to CORS. Thanks

Legomix13 commented 2 years ago

Awesome, I will contact you once I finish the development

Many thanks!

hnimminh commented 2 years ago

Well note, I'm exciting to see your UI. :)