我尝试通过vue-trix上传附件时收到419状态代码

时间:2019-12-15 09:50:55

标签: laravel vue.js trix vue-trix

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

<IfModule mod_headers.c>
  <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
    Header set Access-Control-Allow-Origin "http://mydomain"
  </FilesMatch>
</IfModule>

所以当我得到这个..

<VueTrix
            class="editor1" 
            inputId="editor1"
            v-model="form.complete_description"
            @trix-file-accept="handleFile"          
            @trix-attachment-add="handleAttachmentAdd"
            @trix-attachment-remove="handleAttachmentRemove"
            />

0 个答案:

没有答案