mirror of
https://github.com/vlang/v.git
synced 2025-09-08 14:51:53 -04:00
veb: allow route methods, that are tagged with @[unsafe]
This commit is contained in:
parent
656afa9d13
commit
90ab5d2cdb
@ -18,6 +18,10 @@ fn parse_attrs(name string, attrs []string) !([]http.Method, string, string) {
|
|||||||
attr := x[i]
|
attr := x[i]
|
||||||
attru := attr.to_upper()
|
attru := attr.to_upper()
|
||||||
m := http.method_from_str(attru)
|
m := http.method_from_str(attru)
|
||||||
|
if attru == 'UNSAFE' {
|
||||||
|
x.delete(i)
|
||||||
|
continue
|
||||||
|
}
|
||||||
if attru == 'GET' || m != .get {
|
if attru == 'GET' || m != .get {
|
||||||
methods << m
|
methods << m
|
||||||
x.delete(i)
|
x.delete(i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user