middleware

command
v0.3.750 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

Middleware Example

This example adds a simple authentication middleware to Fn. See main.go for example code.

Building and Running

go build
./middleware

Then test with:

# First, create an app
fn create app myapp
# And test
curl http://localhost:8080/v1/apps

You should get a 401 error.

Add an auth header and it should go through successfully:

curl -X GET -H "Authorization: Bearer KlaatuBaradaNikto" http://localhost:8080/v1/apps

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL