Skip to content

Conversation

@chrispage1
Copy link

Hey Nuno, amazing package as ever so thank you!

However... For some routes, it might be that you don't want to have Pan inject its code.

An example of this - I was creating a web page that generates an HTML mailer and that source code is pulled in by Campaign Monitor. Campaign Monitor began rejecting our emails because we were now trying to inject JavaScript.

Usage:

Route::get('/testing', function() {
  return view('pages.no-pan');
})->middleware(Pan\Adapters\Laravel\Http\Middleware\WithoutPan::class);

This will prevent Pan from injecting its code on this specific route only.

Thanks!

@chrispage1
Copy link
Author

I've realised it wouldn't pass static analysis because $route->middleware() can return an array or Route. Tidied up to pass

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant