File tree Expand file tree Collapse file tree 4 files changed +33
-0
lines changed
resources/assets/pterodactyl/scripts Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ let token = document.head.querySelector('meta[name="csrf-token"]');
3030
3131if ( token ) {
3232 window . axios . defaults . headers . common [ 'X-CSRF-TOKEN' ] = token . content ;
33+ window . X_CSRF_TOKEN = token . content ;
3334} else {
3435 console . error ( 'CSRF token not found in document.' ) ;
3536}
Original file line number Diff line number Diff line change 1212 </div >
1313 </div >
1414 <div >
15+ <csrf />
1516 <button class =" btn btn-blue btn-jumbo" type =" submit" >
1617 {{ $t('auth.recover_account') }}
1718 </button >
2627</template >
2728
2829<script >
30+ import Csrf from " ../shared/CSRF" ;
31+
2932 export default {
33+ components: {Csrf},
3034 name: ' forgot-password' ,
3135 props: {
3236 email: {type: String , required: true },
3337 },
38+ data : function () {
39+ return {
40+ X_CSRF_TOKEN : window .X_CSRF_TOKEN ,
41+ };
42+ },
3443 methods: {
3544 updateEmail : function (event ) {
3645 this .$emit (' update-email' , event .target .value );
Original file line number Diff line number Diff line change 1717 </div >
1818 </div >
1919 <div >
20+ <csrf />
2021 <button class =" btn btn-blue btn-jumbo" type =" submit" >
2122 {{ $t('auth.sign_in') }}
2223 </button >
3132</template >
3233
3334<script >
35+ import Csrf from " ../shared/CSRF" ;
36+
3437 export default {
38+ components: {Csrf},
3539 name: ' login-form' ,
3640 props: {
3741 email: { type: String , required: true },
3842 },
43+ data : function () {
44+ return {
45+ X_CSRF_TOKEN : window .X_CSRF_TOKEN ,
46+ };
47+ },
3948 methods: {
4049 updateEmail : function (event ) {
4150 this .$emit (' update-email' , event .target .value );
Original file line number Diff line number Diff line change 1+ <template >
2+ <input type =" hidden" name =" _token" v-bind:value =" X_CSRF_TOKEN" />
3+ </template >
4+
5+ <script >
6+ export default {
7+ name: ' csrf' ,
8+ data : function () {
9+ return {
10+ X_CSRF_TOKEN : window .X_CSRF_TOKEN ,
11+ };
12+ },
13+ }
14+ </script >
You can’t perform that action at this time.
0 commit comments