How to restrict a user to view the file from web URL

Hi,
I want to restrict any user who are trying access any js file or any client side file from web URL.
For eg. if user put www.test.com/js/sample.js in browser then he will able to view the code.
Is there any way to restrict the same.
Please suggest.
Any suggesion.
Thanks In Advance
Manoj
Edited by: user12780476 on Dec 28, 2011 12:18 AM

Does the javascript file is really a private resource?
Assuming it is a private resource, here are the few things you can do :
1. Don't put it into document root at all.
2. Put it in a location where access is denied e.g.
/mydocs/private/
<If uri =~ '/private'>
PathCheck fn="deny-existense"
</If>
3. Use access control list (acls) to deny access to private resources.
4. Use <If> else around send-file SAF e.g.
<If uri !~ "*.js">
Service fn="send-file"
</If>
5. Use htaccess to deny access to those resources.
So it all depends on what you really want to achieve.

Similar Messages

  • Since I downloaded version 4 of Firefox, I'm having the following problems: Extremely slow at loading all web sites, can't view PDF files from web sites, and lots of unresponsive script messages. How can I fix this?

    I downloaded version 4 of Firefox this week and have been having problems since. Firefox is now extremely slow at loading all web sites. Trying to view PDF files from web sites crashes Firefox. I'm getting lots of unresponsive script messages. How can I fix this?

    I downloaded version 4 of Firefox this week and have been having problems since. Firefox is now extremely slow at loading all web sites. Trying to view PDF files from web sites crashes Firefox. I'm getting lots of unresponsive script messages. How can I fix this?

  • Since upgrading to FF 7.0.1 I can no longer view .pdf files from web pages and there is no plug in..

    The .pdf viewer plug in for FF3.6 worked fine but upgrading to FF7.0.1 has caused the problem. There are no such plugins for this version. I must go back to FF3.6 with the plugin and then if one for FF7.0.1 doesn;t exist by the time Mozilla stops supporting 3.6 I will go back to Safari as my browser I guess.

    I already reinstalled the Adobe's and it didn't solve anything. What I did find is that when faced with a pdf I want to view, I have to right click "Save Link As..." and then I can view the resultant pdf. Cumbersome perhaps but I guess it works.
    Thanks though for the snotty tone in your response; indeed I realize its not FF's job to ensure my machine is updated. However I'm a business guy not an IT guy and my guess is the business guys at Mozilla would want to be aware of things that would impact the use of their product. And if moving forward with new iterations and updated versions of their product changed the users experience in a negative fashion, however caused, I'm sure they would want to consider what actions they may or may not want to take.
    Furthermore its unfortunate that you mistakenly interpreted my words to mean that I expected them to rectify the issue for me. I simply stated that currently it doesn't work for me and if that doesn't change, I would have to move in a different direction. Simple as that. It's not a big deal.
    So perhaps your typical IT guy "users are so dumb" mantra was misplaced here.

  • How to download a file from Web-URL to local HD

    Hy,
    I am trying to download a picture from a specific URL such as
    "http://ia.imdb.com/media/imdb/01/I/66/16/02m.jpg"
    to my local HD, but I only have experience in downloading text based files, such as HTML using the BufferedReader method and a URL object to read the text based HTML file and PrintWriter to write the file on my HD. I have a hard time finding a good tutorial on this, so I would be more than happy to get any help from you guys, the cherry on the cake would of course be a code sample for demonstration...
    Please!

    Use BufferedOutputStream and BufferedInputStream rather than
    BufferedReader and BufferedWriter.
    Should be the same otherwise.

  • Urgent- using adobe flash player 10 to view files from a URL (in javascript)

    Hello
    I am trying to cereate a video search engine that retrieves and then plays videos. I have decided to use adobe flash player to play the given files, howver with no luck. I am successful at actually hosting the player in my html code, however, when I provide the player with the following URL to retrieve the video frmo it, I am completely unsuccessful at getting the video to play in the player.
    http://developer.truveo.com/apps/home/index.php?method=truveo.videos.getVideos&query=id%3A 4186222390&play=1
    what am I doing wrong? this is extremely urgent that I get this donem running against a close deadline. Kindly, advise me what is the best way to play the files from such URL's after the search engnie has found them. The whole thing I am trying to acheive is playing a given searched video within my current html page. So i decided to host the player in my code.
    Please, do take some time to consider my request. Your time is greatly appreciated
    Best

    This seems to be a problem for everyone. A
    ny new downloads to fix this issue?
    Thanks,

  • How many users can view the same report at the same time in obiee answers

    Hi All,
    How many users can view the same report at the same time in obiee answers..?
    What is max and minimum number of users.
    Do we need to increase any system configuration.
    Thanks,
    Jagadees.

    Hi,
    Many users can view report at same time.It depends on the server if it can accept those many users at same time.If number of users increases OC4J may not work properly.
    Refer : http://www.artofbi.com/index.php/2009/10/what-is-oc4j-an-oracle-application-server-distribution-really/
    Regards,
    Srikanth

  • Restrict the users to view the column, row details

    Experts
    For example restrict the sales users to view the purchase price, and restrict the purchase users to view the selling price.
    Any inputs highly appreciated

    Hi,
    Restrict the users to view the column can be done through form settings.
    I don't think it is possible to restrict the users to view the particular row details. If user can open the form, no option to hide any rows through authorization.
    Thanks,
    Gordon

  • How to restrict the Copying/printing of the file from document

    Hi..
    Case:
    1. I have a document number it has three files in it.I want to locked the files from priniting and copying but not from opening/displaying.
    2. I am using content server for storing the DMS documents.How to restrict the number of attachments that can be uploaed in one document number?
    3.How to restrict the maximum size that can be uploaded against one document number?
    Sandip

    Hi Sandip,
    1. I have a document number it has three files in it.I want to locked the files from priniting and copying but not from opening/displaying.
    In DC30 transaction,in Workstation application for network,disable the print option.Will ensure users will not be able to print the originals.
    2. I am using content server for storing the DMS documents.How to restrict the number of attachments that can be uploaed in one document number?
    See if your ABAPer can use the BADI  'DOCUMENT_MAIN01' with method 'BEFORE_SAVE' to handle this check.
    3.How to restrict the maximum size that can be uploaded against one document number?
    Believe you are using kPro as a storage option.If this is the case,then there is no setting available to limit the file size for upload.See if your Basis guy can set an upper limit for file size in IIS setting for your content server.
    If you are using SAP DB as a storage option(not recommended though),then use the field File Size in DC10 transaction,Define Document Types to effect a file size limit.
    P.S. Would appreciate incase you could close the threads which have been answered satisfactorily.
    Regards,
    Pradeepkumar Haragoldavar

  • How to Restrict a user to a access a particular table

    HI ,
    how to restrict an user to a one particular table and he should have only dispaly authorization for that , can anyone suggest me how to do this.

    Hi,
    Is it a standard table ? S_TABU_DIS (Client Dependant) and S_TABU_CLI (Cross client) are the the authorization objects that controls table maintenance. With Authorization group and activity 03, you can give user access only to Display.
    You can look at table TDDAT to find the authorization group of the table. If it is a custom table for which original t-code is SM30 ( You can look at SU24 to verify that) and it does not have authorization group assigned to it, then you can ask your developer to assign authorization group to the table using t-code SE54. then again make use of S_tabu_dis with activity 03 and Auth group as designed to restrict access.
    Also something to look for is Note 1481950 - New authorization check for generic table access using new auth object S_TABU_NAM. Remember Bernhard talking about it.
    Edited by: Nishant Sourabh on Oct 1, 2010 8:13 PM

  • How to make users to select the date from calendar control my making the date field read only in date time control in external list in sharepoint 2010

    How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
    be done through sharepoint desginer / out of the box.
    thanks.

    Congratulate you got the solution by yourself. I am new to a
    WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
    calendar date selection did me a great favor. Cheers.

  • How to set Multi User Environment in the weblogic 5.1 and 6.1 server..(Urgently)

    Hi all,
    I need to know how to set Multi User Environment in the weblogic 5.1
    properties file..
    Here my question is..:)
    1) I have a database with multiple users and having different privileges
    for the users.. and i need to use all the privileges when user aceess
    the database through weblogic server connectionPool.
    2)According to the user privileges i need access the database tables
    content and gives the frontEnd(jsp).
    3)How to modify dynamically weblogic.properties file in the weblogic
    5.1.
    If anybody having idea reg. this issues pl...help me..
    Thanks in advance
    Chandu([email protected],[email protected])

    Hi. A JDBC connection pool is a set of identical, interchangeable, pre-made
    connections, and the controls to make sure only one user uses a particular
    connection at any one time. If you want to have different DBMS users, you can
    have a separate pool for each DBMS user, which may contain as many or few
    connections as you want. Some applications has a pool for the accounting
    applications, and another for the sales applications etc. Some do have a
    separate pool for john, jane, joe etc, each with one connection. Pools
    can be created and destroyed dynamically using the dynamic pool API.
    Joe
    softstar wrote:
    >
    Hi all,
    I need to know how to set Multi User Environment in the weblogic 5.1
    properties file..
    Here my question is..:)
    1) I have a database with multiple users and having different privileges
    for the users.. and i need to use all the privileges when user aceess
    the database through weblogic server connectionPool.
    2)According to the user privileges i need access the database tables
    content and gives the frontEnd(jsp).
    3)How to modify dynamically weblogic.properties file in the weblogic
    5.1.
    If anybody having idea reg. this issues pl...help me..
    Thanks in advance
    Chandu([email protected],[email protected])

  • How To Overcome When User Incorrectly Opened The First Inventory Accounting Period As Next Month

    Hi,
    User has opened the wrong first inventory account period. Instead of Aug-14, next period Sep-14 has been opened. There are transactions which need to be posted in Aug-14. How can I rectify this?
    During my search in oracle support, I found below information but the note is not accessible.
    "Internal Note 400900.1 How To Overcome When User Incorrectly Opened The First Inventory Accounting Period As Next Month"
    Regards,
    Ahmed

    Hi ,
    Try This Way...
       If you want to use the uesr exit in two places...
          If area = xyz
           variable1
         else
             variable2.
    same function module you can use in different places...
    If still not clear send me the full details where you want to use then i can send it to you with sample code.
    Thanks..
    Siri N

  • After downloading a pdf from a website, how can I view the file in Safari 6.0.4 (just as I can in Safari 5.0.6)?  I bet that it's simple, but I've missed something, somewhere, and a solution will be greatly appreciated.

    After downloading a pdf from a website, how can I view the file in Safari 6.0.4 (just as I can in Safari 5.0.6)?  I bet that it's simple, but I've missed something, somewhere, and a solution will be greatly appreciated.

    Hello Kirk,
    Thank's for your efforts, and I just wish that this was the solution.  Unfortunately, it isn't because, after double-clicking on the pdf in the website, it simply "opens" in another Safari window as a black screen - the pdf is there, somewhere, but not visible (either as an icon, or as a document). 
    When I right-click in the black Safari window, where the file is supposed to be, the only option available to display the file is to "Open file in Internet Explorer" (which is not what I want to do).  Other options include saving or printing the pdf, which I don't want until I've confirmed that it's the form that I want.  The same options are offered if I right-click on the file icon in the website.
    Any other suggestions, please?

  • How can i convert 2k resolution dpx files of a movie to DCP and will they be able to open the harddisk and view the files?

    how can i convert 2k resolution dpx files of a movie to DCP and will they be able to open the harddisk and view the files?

    AFAIK, this is beyond the capabilities of FCPX/Compressor. This company makes a plug-in, which I have to say I have no experience with. Here is a thread that may give you some other ideas. Good luck.
    Russ

  • How can i stop user to get the same screen while entering same T code

    hi experts,
    how can i stop user to get the same screen while entering same T code (_Means i want user enter same t code but got different different screen how it is possible.)_
    i want to know how can we set a authorization is such a manner ...
    Through different different login id user got different different screen while entering same T-code.
    for example if there is two functional login id mum & noida...
    then user login through that and
    enter any same functional tcode (for getting purchase order)
    but get different different window...so how come it is possible.....
    plz explain in brief
    thanks in advance...plz do reply as soon as possible

    For a custom transaction this is easy, you need to ask your developers to be able to direct users to different screens based on the results of an authorisation check.  You could have an auth field e.g. ZSCREEN which is checked in the program & decides what screen the user has access to.
    For standard transactions, unless already coded, I would forget it & do what is recommended by Subramaniam and create transaction variants as required.  Assign each variant to a custom t-code and users access it that way.
    What I am interested is is why do you want to do this?

Maybe you are looking for