scribe icon indicating copy to clipboard operation
scribe copied to clipboard

Asset URLs are incorrect when Laravel is running in a subdirectory

Open Jamesking56 opened this issue 9 months ago • 2 comments

Scribe version

4.24.0

PHP version

8.2

Framework

Laravel

Framework version

10.15.0

Scribe config

title => "API Documentation"
base_url => "http://localhost"
type => "laravel"
laravel.docs_url => "/api/docs"
try_it_out.enabled => false
try_it_out.base_url => "http://localhost"
auth.enabled => true
auth.default => true
auth.name => "token"
auth.placeholder => "{YOUR_TOKEN}"

What happened?

When Laravel is running in a subdirectory, Scribe generates documentation with no CSS or JS working due to the fact that is expects /vendor is accessible.

I think one way to fix this would be to offer a way to use a CDN for assets rather than having them live in Laravel.

Docs

Jamesking56 avatar Sep 18 '23 19:09 Jamesking56

Ah, I don't know. Can you send a fix for this? It's not a use case I (or many users, apparently) work with.

shalvah avatar Sep 29 '23 22:09 shalvah

@Jamesking56 Hi, can you share a simplified nginx config?

ccec1t91077 avatar Oct 18 '23 09:10 ccec1t91077