Skip to content

#### Version 1.5.7.7#156

Merged
devfeel merged 1 commit intomasterfrom
develop
Sep 19, 2018
Merged

#### Version 1.5.7.7#156
devfeel merged 1 commit intomasterfrom
develop

Conversation

@devfeel
Copy link
Owner

@devfeel devfeel commented Sep 19, 2018

  • New Feature: Add HttpServer.SetEnabledAutoOPTIONS, used to set route use auto options
  • Detail:
    • ignore auto set if register router is options method
    • you can view example on example/router
  • Example:
    app.HttpServer.SetEnabledAutoOPTIONS(true)
  • Fixed Bug: When use HttpServer.SetEnabledAutoHead, ignore auto set if register router is head method
  • Log output: Add debug log when AutoOPTIONS and AutoHead doing
  • Like:
    2018-09-19 15:44:42.8189 [DEBUG] [router.go:437] DotWeb:Router:RegisterRoute success [GET] [/] [main.Index]
    2018-09-19 15:44:42.8199 [DEBUG] [router.go:462] DotWeb:Router:RegisterRoute AutoHead success [HEAD] [/] [main.Index]
    2018-09-19 15:44:42.8199 [DEBUG] [router.go:474] DotWeb:Router:RegisterRoute AutoOPTIONS success [OPTIONS] [/] [main.Index]
    
  • 2018-09-19 18:00

* New Feature: Add HttpServer.SetEnabledAutoOPTIONS, used to set route use auto options
* Detail:
  - ignore auto set if register router is options method
  - you can view example on example/router
* Example:
  ``` golang
  app.HttpServer.SetEnabledAutoOPTIONS(true)
  ```
* Fixed Bug: When use HttpServer.SetEnabledAutoHead, ignore auto set if register router is head method
* Log output: Add debug log when AutoOPTIONS and AutoHead doing
* Like:
  ~~~
  2018-09-19 15:44:42.8189 [DEBUG] [router.go:437] DotWeb:Router:RegisterRoute success [GET] [/] [main.Index]
  2018-09-19 15:44:42.8199 [DEBUG] [router.go:462] DotWeb:Router:RegisterRoute AutoHead success [HEAD] [/] [main.Index]
  2018-09-19 15:44:42.8199 [DEBUG] [router.go:474] DotWeb:Router:RegisterRoute AutoOPTIONS success [OPTIONS] [/] [main.Index]
  ~~~
* 2018-09-19 18:00
@devfeel devfeel merged commit cb933e3 into master Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant