service: hello-world # NOTE: update this with your service name

frameworkVersion: '2'

provider:
  name: cloudflare
  config:
    accountId: CLOUDFLARE_ACCOUNT_ID
    zoneId: CLOUDFLARE_ZONE_ID

plugins:
  - serverless-cloudflare-workers

functions:
  hello:
    name: hello
    script: helloWorld
    events:
      - http:
          url: example.com/hello/*
          method: GET
          headers:
            foo: bar
            x-client-data: value

  foo:
    name: foo
    script: bar
    events:
      - http:
          url: example.com/foo/*
          method: GET
          headers:
            foo: bar
            x-client-data: value
