Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve page to URL againt project root #2114

Open
mvorisek opened this issue Sep 28, 2023 · 2 comments
Open

Resolve page to URL againt project root #2114

mvorisek opened this issue Sep 28, 2023 · 2 comments

Comments

@mvorisek
Copy link
Member

mvorisek commented Sep 28, 2023

ie. to refer assets in deps, page like vendor/xxx/yyy/assets/u.js should be supported

related with #1788, #1727 (comment), #2095

@gowrav-vishwakarma
Copy link
Collaborator

gowrav-vishwakarma commented Sep 29, 2023

please post at #2114 issue the following:

When integrating with Laravel, that is up in development environment by Valet (https://laravel.com/docs/10.x/valet)
cdn does not work out of box, we have to copy assets in laravel public folder

Here is out put of $_SERVER

array:87 [▼ // vendor/atk4/ui/src/App.php:174
  "USER" => "gowrav"
  "HOME" => "/Users/gowrav"
  "HTTP_COOKIE" => "remember_web_59ba36addc2b2f9401580f014c7f58ea4e30989d=eyJpdiI6IklFYjZhdkwzVU9RY0hOTWp1VUNXOHc9PSIsInZhbHVlIjoiS2xhMUxyNjF2NndMTzY2STRPK0lmQ09KR2RiSm5Fdk1ENHNLTk ▶"
  "HTTP_ACCEPT_LANGUAGE" => "en-US,en;q=0.9,hi;q=0.8"
  "HTTP_ACCEPT_ENCODING" => "gzip, deflate"
  "HTTP_REFERER" => "http://xavoc-web.test/login"
  "HTTP_ACCEPT" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
  "HTTP_USER_AGENT" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
  "HTTP_UPGRADE_INSECURE_REQUESTS" => "1"
  "HTTP_DNT" => "1"
  "HTTP_CACHE_CONTROL" => "max-age=0"
  "HTTP_CONNECTION" => "keep-alive"
  "HTTP_HOST" => "xavoc-web.test"
  "PATH_INFO" => ""
  "REDIRECT_STATUS" => "200"
  "SERVER_NAME" => ""
  "SERVER_PORT" => "80"
  "SERVER_ADDR" => "127.0.0.1"
  "REMOTE_PORT" => "56168"
  "REMOTE_ADDR" => "127.0.0.1"
  "SERVER_SOFTWARE" => "nginx/1.25.1"
  "GATEWAY_INTERFACE" => "CGI/1.1"
  "SERVER_PROTOCOL" => "HTTP/1.1"
  "DOCUMENT_ROOT" => ""
  "DOCUMENT_URI" => "/Users/gowrav/.composer/vendor/laravel/valet/server.php"
  "REQUEST_URI" => "/mm/dashboard"
  "SCRIPT_NAME" => "/Users/gowrav/.composer/vendor/laravel/valet/server.php"
  "SCRIPT_FILENAME" => "/Users/gowrav/.composer/vendor/laravel/valet/server.php"
  "CONTENT_LENGTH" => ""
  "CONTENT_TYPE" => ""
  "REQUEST_METHOD" => "GET"
  "QUERY_STRING" => ""
  "FCGI_ROLE" => "RESPONDER"
  "PHP_SELF" => "/Users/gowrav/.composer/vendor/laravel/valet/server.php"
  "REQUEST_TIME_FLOAT" => 1695956096.4043
  "REQUEST_TIME" => 1695956096
  "APP_NAME" => "Laravel"
  "APP_ENV" => "local"
  "APP_KEY" => "base64:NA7dAKOT8qOEftg1gzAMRbrjcsdPl35nbXjS23OfLyE="
  "APP_DEBUG" => "true"
  "APP_URL" => "http://localhost"
  "CACHE_EXPIRE" => "-1"
  "LOG_CHANNEL" => "stack"
  "LOG_DEPRECATIONS_CHANNEL" => "null"
  "LOG_LEVEL" => "debug"
  "DB_CONNECTION" => "mysql"
  "DB_HOST" => "127.0.0.1"
  "DB_PORT" => "3306"
  "DB_DATABASE" => "mm_server"
  "DB_USERNAME" => "root"
  "DB_PASSWORD" => "password_here"
  "BROADCAST_DRIVER" => "log"
  "CACHE_DRIVER" => "file"
  "FILESYSTEM_DISK" => "local"
  "QUEUE_CONNECTION" => "sync"
  "SESSION_DRIVER" => "file"
  "SESSION_LIFETIME" => "120"
  "MEMCACHED_HOST" => "127.0.0.1"
  "REDIS_HOST" => "127.0.0.1"
  "REDIS_PASSWORD" => "null"
  "REDIS_PORT" => "6379"
  "MAIL_MAILER" => "smtp"
  "MAIL_HOST" => "mailpit"
  "MAIL_PORT" => "1025"
  "MAIL_USERNAME" => "null"
  "MAIL_PASSWORD" => "null"
  "MAIL_ENCRYPTION" => "null"
  "MAIL_FROM_ADDRESS" => "[email protected]"
  "MAIL_FROM_NAME" => "Laravel"
  "AWS_ACCESS_KEY_ID" => ""
  "AWS_SECRET_ACCESS_KEY" => ""
  "AWS_DEFAULT_REGION" => "us-east-1"
  "AWS_BUCKET" => ""
  "AWS_USE_PATH_STYLE_ENDPOINT" => "false"
  "PUSHER_APP_ID" => ""
  "PUSHER_APP_KEY" => ""
  "PUSHER_APP_SECRET" => ""
  "PUSHER_HOST" => ""
  "PUSHER_PORT" => "443"
  "PUSHER_SCHEME" => "https"
  "PUSHER_APP_CLUSTER" => "mt1"
  "VITE_APP_NAME" => "Laravel"
  "VITE_PUSHER_APP_KEY" => ""
  "VITE_PUSHER_HOST" => ""
  "VITE_PUSHER_PORT" => "443"
  "VITE_PUSHER_SCHEME" => "https"
  "VITE_PUSHER_APP_CLUSTER" => "mt1"
]

and here is $this->cdn['jquery'] before loop in App#174

"/public/external/jquery/dist" // vendor/atk4/ui/src/App.php:176

and here is $this->cdn['jquery'] AFTER loop in App#174

"/Development/xavoc-eco/xavoc-web/vendor/atk4/ui/public/external/jquery/dist" // vendor/atk4/ui/src/App.php:183

@mvorisek
Copy link
Member Author

@gowrav-vishwakarma what is the actual and expected jquery.min.js rendered URL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants