How do I make a trailing slash optional with webapp2?

后端 未结 9 820
感情败类
感情败类 2021-02-12 15:30

I\'m using the new webapp2 (now the default webapp in 1.6), and I haven\'t been able to figure out how to make the trailing slash optional in code like this:

web         


        
9条回答
  •  野的像风
    2021-02-12 16:16

    I am not familiar with webapp2, but if the first parameter is a regular expression, try:

    /feed(/)?
    

提交回复
热议问题