とーますメモ

Ruby on Rails / Goなどの学習メモ

Flask

【Flask】HTTPS環境で、Ajaxを使用するページを開いたら、エラーが出た。

件名の通り、以下のようなエラーが出た The page at 'URL' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'URL'. This request has been blocked; the content must be served over HTTPS.原因はスラッシュ漏れ。FlaskもDjango…

【MySQL】SQLAlchemy内でMySQLの全文検索を試めしてみた

MySQLの設定は以下を参考 thoames.hatenadiary.jp 検索対象のインデックスがつけられる単語の最小長と最大長の設定 InnoDBなら「innodb_ft_min_token_size」、MyISAMなら「ft_min_word_len」で最小長を設定 InnoDBなら「innodb_ft_max_token_size」、MyISAM…

【Python】Flaskの本番環境について調べてみた

Flaskにはbuilt-inサーバがついているので、開発には全く困らないが 公式サイトを見ると以下のように記述があるので、本番環境は別に構築する必要がある。 While lightweight and easy to use, Flask’s built-in server is not suitable for production as i…