]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/application.js
Cache csrf properties
[rails.git] / app / assets / javascripts / application.js
index a3fd93e27c1daaa3cd08a5881f6d266cf6e16e1b..99bfede7e0b88ed292a7c45e722debc8fa1f01fb 100644 (file)
@@ -95,6 +95,9 @@ $(document).ready(function () {
         breakpointWidth = 768;
   let moreItemWidth = 0;
 
+  OSM.csrf = {};
+  OSM.csrf[($("meta[name=csrf-param]").attr("content"))] = $("meta[name=csrf-token]").attr("content");
+
   function updateHeader() {
     const windowWidth = $(window).width();