File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -604,9 +604,7 @@ def has_modified_header(headers):
604
604
Autocomplete searching via HTTP URL
605
605
"""
606
606
@app .route ('/q/<query>' , defaults = {'country_code' : None })
607
- @app .route ('/q/<query>.js' , defaults = {'country_code' : None })
608
607
@app .route ('/<country_code>/q/<query>' )
609
- @app .route ('/<country_code>/q/<query>.js' )
610
608
def search_url (country_code , query ):
611
609
autocomplete = True
612
610
code = 400
@@ -634,6 +632,13 @@ def search_url(country_code, query):
634
632
return formatResponse (data , code )
635
633
636
634
635
+ # Alias without redirect
636
+ @app .route ('/q/<query>.js' , defaults = {'country_code' : None })
637
+ @app .route ('/<country_code>/q/<query>.js' )
638
+ def search_url_js (country_code , query ):
639
+ return search_url (country_code , query )
640
+
641
+
637
642
638
643
# ---------------------------------------------------------
639
644
"""
You can’t perform that action at this time.
0 commit comments