mirror of
https://github.com/kataras/iris.git
synced 2025-03-15 17:36:29 +01:00
add Iris + Serverless example link
This commit is contained in:
parent
8e049d77c9
commit
ef5685bf7e
|
@ -217,7 +217,7 @@ For a more detailed technical documentation you can head over to our [godocs](ht
|
||||||
|
|
||||||
[](https://www.facebook.com/iris.framework)
|
[](https://www.facebook.com/iris.framework)
|
||||||
|
|
||||||
You can [request](https://iris-go.com/#book) a PDF version and online access of the **E-Book** today and be participated in the development of Iris.
|
You can [request](https://www.iris-go.com/#ebookDonateForm) a PDF version and online access of the **E-Book** today and be participated in the development of Iris.
|
||||||
|
|
||||||
## 🙌 Contributing
|
## 🙌 Contributing
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Table of Contents
|
# Table of Contents
|
||||||
|
|
||||||
|
* [Serverless](https://github.com/iris-contrib/gateway#netlify)
|
||||||
* [REST API for Apache Kafka](kafka-api)
|
* [REST API for Apache Kafka](kafka-api)
|
||||||
* [URL Shortener](url-shortener)
|
* [URL Shortener](url-shortener)
|
||||||
* [Dropzone.js](dropzonejs)
|
* [Dropzone.js](dropzonejs)
|
||||||
|
|
|
@ -37,6 +37,7 @@ type Supervisor struct {
|
||||||
closedManually uint32 // future use, accessed atomically (non-zero means we've called the Shutdown)
|
closedManually uint32 // future use, accessed atomically (non-zero means we've called the Shutdown)
|
||||||
closedByInterruptHandler uint32 // non-zero means that the end-developer interrupted it by-purpose.
|
closedByInterruptHandler uint32 // non-zero means that the end-developer interrupted it by-purpose.
|
||||||
manuallyTLS bool // we need that in order to determinate what to output on the console before the server begin.
|
manuallyTLS bool // we need that in order to determinate what to output on the console before the server begin.
|
||||||
|
autoTLS bool
|
||||||
shouldWait int32 // non-zero means that the host should wait for unblocking
|
shouldWait int32 // non-zero means that the host should wait for unblocking
|
||||||
unblockChan chan struct{}
|
unblockChan chan struct{}
|
||||||
|
|
||||||
|
@ -355,6 +356,8 @@ func (su *Supervisor) ListenAndServeAutoTLS(domain string, email string, cacheDi
|
||||||
hostPolicy = autocert.HostWhitelist(domains...)
|
hostPolicy = autocert.HostWhitelist(domains...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
su.autoTLS = true
|
||||||
|
|
||||||
autoTLSManager := &autocert.Manager{
|
autoTLSManager := &autocert.Manager{
|
||||||
Prompt: autocert.AcceptTOS,
|
Prompt: autocert.AcceptTOS,
|
||||||
HostPolicy: hostPolicy,
|
HostPolicy: hostPolicy,
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
// This function should be registered on Serve.
|
// This function should be registered on Serve.
|
||||||
func WriteStartupLogOnServe(w io.Writer) func(TaskHost) {
|
func WriteStartupLogOnServe(w io.Writer) func(TaskHost) {
|
||||||
return func(h TaskHost) {
|
return func(h TaskHost) {
|
||||||
guessScheme := netutil.ResolveScheme(h.Supervisor.manuallyTLS || h.Supervisor.Fallback != nil)
|
guessScheme := netutil.ResolveScheme(h.Supervisor.autoTLS || h.Supervisor.manuallyTLS || h.Supervisor.Fallback != nil)
|
||||||
addr := h.Supervisor.FriendlyAddr
|
addr := h.Supervisor.FriendlyAddr
|
||||||
if addr == "" {
|
if addr == "" {
|
||||||
addr = h.Supervisor.Server.Addr
|
addr = h.Supervisor.Server.Addr
|
||||||
|
|
|
@ -138,6 +138,7 @@ func defaultErrorHandler(ctx *context.Context) {
|
||||||
|
|
||||||
func (h *routerHandler) Build(provider RoutesProvider) error {
|
func (h *routerHandler) Build(provider RoutesProvider) error {
|
||||||
h.trees = h.trees[0:0] // reset, inneed when rebuilding.
|
h.trees = h.trees[0:0] // reset, inneed when rebuilding.
|
||||||
|
h.errorTrees = h.errorTrees[0:0]
|
||||||
|
|
||||||
// set the default error code handler, will be fired on error codes
|
// set the default error code handler, will be fired on error codes
|
||||||
// that are not handled by a specific handler (On(Any)ErrorCode).
|
// that are not handled by a specific handler (On(Any)ErrorCode).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user