Close #189
Use NSResourceLoadDelegate to disable the cookie management to avoid see the timeline via profile view Thanks to https://github.com/poweruser82
This commit is contained in:
parent
45365e0d79
commit
9f308a22ca
2 changed files with 10 additions and 0 deletions
|
@ -73,6 +73,8 @@
|
|||
|
||||
- (void)notificateViewsAboutDeletedPostWithId:(NSString *)postId byEntity:(NSString*)entity;
|
||||
|
||||
- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource;
|
||||
|
||||
- (void)setString:(NSString *)string forKey:(NSString *)aKey;
|
||||
- (void)setSecret:(NSString *)string;
|
||||
- (NSString *)secret;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
- (void)awakeFromNib
|
||||
{
|
||||
[timelineViewWindow setExcludedFromWindowsMenu:YES];
|
||||
[timelineView setResourceLoadDelegate:self];
|
||||
|
||||
[self initHotKeys];
|
||||
|
||||
|
@ -432,6 +433,13 @@
|
|||
[timelineView stringByEvaluatingJavaScriptFromString:fun];
|
||||
}
|
||||
|
||||
/* we disable cookies to avoid see a timeline during the consultation of a profile with which the user are connected through safari cf https://github.com/jeena/Bungloo/issues/189 */
|
||||
- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource{
|
||||
NSMutableURLRequest * response = [request mutableCopy];
|
||||
[response setHTTPShouldHandleCookies:FALSE];
|
||||
return response;
|
||||
}
|
||||
|
||||
- (void)loggedIn
|
||||
{
|
||||
[loginActivityIndicator stopAnimation:self];
|
||||
|
|
Reference in a new issue