Skip to content

Commit

Permalink
Fix Issues 129 and 130 (#133)
Browse files Browse the repository at this point in the history
* 🐛 FIX: #131

* 🐛 FIX: #130 opening url paths that end in a file name gives a 404
  • Loading branch information
apolopena authored May 10, 2021
1 parent b8d937f commit e2aa447
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 2 additions & 8 deletions .gp/bash/open-preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@ exit 1

. .gp/bash/spinner.sh

__path=
if [[ -n $1 ]]; then
if [[ ! $1 =~ \/$ ]]; then
__path=/$1/
else
__path=/$1
fi
fi
__path=/$1

__port=$(bash .gp/bash/helpers.sh get_default_server_port)
if [[ $(bash .gp/bash/helpers.sh is_inited) == 0 ]]; then
. .gp/bash/spinner.sh &&
Expand Down
4 changes: 3 additions & 1 deletion .gp/conf/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ http {
index index.html index.htm index.php;
# Bugfix: https://github.com/apolopena/gitpod-laravel-starter/issues/96
# Rewrite urls that dont have a trailing slash to have a trailing slash thus bypassing redirection.
# Bugfix: https://github.com/apolopena/gitpod-laravel-starter/issues/131
# force rewrite to use https in order to bypass mixed content errors when in an iframe
if (-d $request_filename) {
rewrite [^/]$ $scheme://$http_host$uri/ permanent;
rewrite [^/]$ https://$http_host$uri/ permanent;
}
try_files $uri $uri/ /index.php$is_args$args;
}
Expand Down

0 comments on commit e2aa447

Please sign in to comment.