question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support @http options functions

See original GitHub issue

Describe the issue Today, one cannot create a function to handle HTTP options preflight requests; those instead wind up falling back to get / to be handled for all endpoints.

That’s probably fine for many cases, but likely anyone being mindful of how they handle CORS preflight requests will want to set up an actual proper options endpoint.

It’d probably look like this:

@http
get     /foo # src/http/get-foo
put     /foo # src/http/put-foo
options /foo # [new!] src/http/options-foo

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
krimplecommented, Apr 30, 2020

ok, will do.

1reaction
AustinGilcommented, Apr 9, 2020

Yeah. I’ve made a couple small edits, but I’d like to get a better grip on things and then start contributing more. In any case, hopefully some of the discussion here will help folks that DuckDuckGo it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OPTIONS - HTTP - MDN Web Docs
The HTTP OPTIONS method requests permitted communication options for a given URL or server. A client can specify a URL with this method, ......
Read more >
What is HTTP OPTIONS Method? - ReqBin
The HTTP OPTIONS method is used to describe communication options for the target resource. For example, browsers send an HTTP OPTIONS ...
Read more >
How to support HTTP OPTIONS verb in ASP.NET MVC ...
We do this to allow the OPTIONS http verb public class BaseApiController : ApiController { public HttpResponseMessage Options() { return new ...
Read more >
HTTP/1.1: Method Definitions
The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.
Read more >
Write HTTP functions | Cloud Functions Documentation
HTTP functions accept the HTTP request methods listed on the page HTTP triggers. Your HTTP handler can inspect the request method and perform...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found