---
title: Events - HTTP - Configure
---

## Hook it up with a function

`FUNCTION/squeezer.yml` :

```yaml
event:
  type: http
  path: /rest/v1/hello
  methods:
    - GET
    # - POST
```

## Parameters 

`/url/path/{id}`

On this case the *{id}* param can be accessed later on your handler as *req.id*

## Wildcard

`/url/path/*`

Every sub path added after the */url/path* will be threated as a wildcard path

## Global HTTP headers

Enable a header trough all available functions .

```yaml
vars:
  http-headers:
    - foo-bar-1: "val"
    - foo-bar-2: "val"
```

## CORS

https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

Enable it for all functions `PROJECT_DIR/squeezer.yml` 

```yaml
stage:
  CORS: 'enabled'
```

It will add this headers for every HTTP return payload :

```
Access-Control-Allow-Headers:*
Access-Control-Allow-Method:*
Access-Control-Allow-Origin:*
```
