problem description
because I"m going to do SPA web. So you need a dynamic configuration file
, for example, I want to: xxx.com/setter.js
Environment
Server: ngnix
php:7.2.6
laravel:5.6
related codes
routing settings
(function(root,factroy){
typeof root.xxxx === "object" ? xxxx.setter = factroy() :
root.setter = factroy();
}(this,function(){
return {
name:"xxx",
csrf:"{{ csrf_token() }}"
};
}));
actual situation
what is returned in the src of script is 404, and there is no content.
returns 404 in the href of link:css, with no content.
returns 404 in the src of img, with content.
address bar access returns 404, with content.
I"m really drunk.