mirror of
https://github.com/vlang/v.git
synced 2025-08-03 09:47:15 -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]
|
||||
attru := attr.to_upper()
|
||||
m := http.method_from_str(attru)
|
||||
if attru == 'UNSAFE' {
|
||||
x.delete(i)
|
||||
continue
|
||||
}
|
||||
if attru == 'GET' || m != .get {
|
||||
methods << m
|
||||
x.delete(i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user